1.0.1129 • Published 4 years ago

cljs-js v1.0.1129

Weekly downloads
4
License
ISC
Repository
github
Last release
4 years ago

cljs-js

*** THIS IS VERY SERIOUS PROTOTYPE AND NOT A PRODUCTION READY PROJECT *

cljs-js is a CLI(command line interface) software to make Clojurescript <-> JavaScript interoperability fast, easy and simple as it aims to let you immediately start Clojurescript <-> JavaScript hacking with one line command.

NPM Version

Installation for Node.js

This is a Node.js module available through the npm registry.

Before installing, download and install Node.js. Node.js 0.10 or higher is required.

If this is a brand new project, make sure to create a package.json first with the npm init command.

Installation is done using the npm install command:

$ npm i	-g cljs-js

How to use

  1. go to your node.js root project that you would like to add clojurescript to.
  2. cljs-js make
$ cljs-js make

cljs-js will generate scaffolding structures for cljs-js interop.

structure should look like this

in ./interop.js generated, you can see clojurescript is exported to javascript. try node ./interop.js

To apply changes of clojurescript, you need..

$ cljs-js compile

After cljs-js make,

From now on, all you need to focus is .. 1. Go to yourproject/cljs/node/core/fn.cljs for node.js or yourproject/cljs/web/core/fn.cljs for web project. 2. If you guess you've write some beautiful functions in fn.cljs, then type ''cljs-js compile'' 3. Then, It will compile your Clojurescript files into optimized Javascripts files in yourproject/cljs_dist.

  • Unfortunately, you should manually interop the rest of it currently whenever you change the codes and compile these while in the later version, hopefully I would like to add some features like auto generate interop codes and auto-compile features whenever saved if possible.

your project ├── cljs │   ├── node │   │   └── core │   │   └── fn.cljs ==> where you write your Clojure code for Node.js. │   └── web │   └── core │   └── fn.cljs ==> where you write your Clojure code for Web browser platform. ├── interop.js ==> where interop between cljs <=> js is done. ├── cljs_dist │   ├── node │   │   └── index.js ==> after cljs-js compile, cljs/node/core/fn.cljs is compiled down into here. │   └── web │   └── index.js ==> after cljs-js compile, cljs/web/core/fn.cljs is compiled down into here. ... ... ..

Installation for Web Browser

CDN

TO BE INTRODUCED

Features

You can create and use Clojurescript immediately into existing Javascript project.

Credits

clojurescript clojure shadow-cljs figwheel

Contributing

Contributing Guide

License

MIT

1.0.1129

4 years ago

1.0.1128

4 years ago

1.0.1127

4 years ago

1.0.1126

4 years ago

1.0.1125

4 years ago

1.0.1124

4 years ago

1.0.1123

4 years ago

1.0.1122

4 years ago

1.0.1121

4 years ago

1.0.1120

4 years ago

1.0.1119

4 years ago

1.0.1118

4 years ago

1.0.1115

4 years ago

1.0.1117

4 years ago

1.0.1116

4 years ago

1.0.1114

4 years ago

1.0.1113

4 years ago

1.0.1112

4 years ago

1.0.1111

4 years ago

1.0.111

4 years ago

1.0.11

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago