cljs-js v1.0.1129
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.
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
- go to your node.js root project that you would like to add clojurescript to.
- 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
License
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago