Leiningen導入メモ
Clojureの開発環境構築のためLeiningenを導入したのでメモ。
導入
「GitHub - technomancy/leiningen: Automate Clojure projects without setting your hair on fire.」の「Installation」の項のとおり。(= lein.bat をダウンロードしてパス通して、「lein self-install」する)
On Windows most users can get the batch file. If you have PowerShell, wget.exe or curl.exe already installed and in PATH, you can just run "lein self-install". If you have Cygwin you should be able to use the shell script above rather than the batch file.
HelloWorld
新規プロジェクト作成
lein new app my-stuff
ビルド、ローカルリポジトリへインストール
cd my-stuff lein install
実行
lein run
あるいは
lein repl (require 'my-stuff.core) (my-stuff.core/-main)
ドキュメント表示
(doc my-stuff.core/-main)
ソース表示
(source my-stuff.core/-main)
テストの実行
lein test