Starter kit for programming Node commands with Clojure.
"chochoi" means 'easy, fast' in Japanese.
- cljs.jar
- nodejs
download cljs.jar
from https://github.com/clojure/clojurescript/releases/latest
set CLJS_PATH.
ex.
export CLJS_PATH="/Users/XXXXX/.cljs/cljs.jar"
install chochoi
$ npm install -g chochoi
generate a your node command project
ex. make hello
command
$ chochoi new hello
⚡ init chochoi project...
-------------------------------
- create : ./hello
- create : ./hello/src/hello
- create : hello/src/hello/core.cljs
- create : hello/src/hello/command.cljs
- create : hello/.gitignore
- create : hello/build.clj
- create : hello/build.js
- create : hello/config.js
- create : hello/package.json
- create : hello/README.md
-------------------------------
👍 completed.
build command, and run!
$ cd hello
$ chochoi build
⚡ build chochoi project...
completed linked command.
completed clojurescript build.
up to date in 0.055s
/Users/XXXXX/.nvm/versions/node/v8.7.0/bin/hello -> /Users/XXXXX/.nvm/versions/node/v8.7.0/lib/node_modules/hello/out/main.js
/Users/XXXXX/.nvm/versions/node/v8.7.0/lib/node_modules/hello -> /Users/XXXXX/study/chochoi/hello
👍 completed.
$ hello kaz
Hello world! kaz
You can edit src/hello/command.cljs
(ns hello.command
(:require [cljs.nodejs :as nodejs]))
(defn command [args]
(println "Hello world!" (str (first args))))
- added 'merry' command. enjoy it!
- start project.
Copyright © Kazuhiro Hara (Greative LLC http://greative.jp/) {:mail kazuhiroh@gmail.com :twitter https://twitter.com/kara_d}
Distributed under the MIT License http://opensource.org/licenses/MIT .