diff --git a/README.org b/README.md similarity index 68% rename from README.org rename to README.md index 5f928a2..991b99a 100644 --- a/README.org +++ b/README.md @@ -1,12 +1,14 @@ -** gen-cli -A Leiningen template for generate the basic Clojure command line interface (CLI) quickly. +## gen-cli -** Usage +A Leiningen template for generate the basic Clojure/Java project template. -#+BEGIN_SRC shell +### Usage + +``` git clone https://github.com/agilecreativity/gen-cli.git && cd gen-cli lein install + # Then you can create new CLI skeletion quickly like mkdir -p ~/tmp && cd ~/tmp @@ -15,12 +17,12 @@ lein new gen-cli awesome-cli && cd awesome-cli && lein deps :tree && lein run # To generate the CLI with with Java code for interops try lein new gen-cli awesome-cli +java && cd awesome-cli && lein deps :tree && lein run -#+END_SRC +``` -** Links -*** [[https://github.com/technomancy/leiningen/blob/stable/doc/MIXED_PROJECTS.md][Mixed Project Template]] +### Links +- [Leiningen Mixed Projects](https://github.com/technomancy/leiningen/blob/stable/doc/MIXED_PROJECTS.md) template -** License +### License Copyright © 2019 Burin Choomnuan diff --git a/TODO.md b/TODO.md index 3a2332c..2258756 100644 --- a/TODO.md +++ b/TODO.md @@ -1,34 +1,31 @@ ## Idea for extension -- [ ] Add sample `config.edn` template but commented out the code - - [ ] see [sq-utils/cli.clj](https://github.com/agilecreativity/sq-utils/blob/master/src/sq_utils/cli.clj) for idea - [ ] Add more example of `org.clojure/tools.cli` - [ ] Allow the user to add more dependencies as options - [ ] Update document to show how to use `lein cljfmt check` and `lein cljfmt fix` - [ ] See example from https://github.com/agilecreativity/reagent-project--reagent-template - - [ ] Turn the options on or off like in the following project template +- [ ] Turn the options on or off like in the following project template - ```clojure - {{#test-hook?}} - :test - {:source-paths ["src/cljs" "src/cljc" "test/cljs"] - :compiler {:main {{project-ns}}.doo-runner - :asset-path "/js/out" - :output-to "target/test.js" - :output-dir "target/cljstest/public/js/out" - :optimizations :whitespace - :pretty-print true}}{{/test-hook?}} - {{#spec-hook?}} - :test - {:source-paths ["src/cljs" "src/cljc" "spec/cljs"] - :compiler {:output-to "target/test.js" - :optimizations :whitespace - :pretty-print true}}{{/spec-hook?}} +```clojure + {{#test-hook?}} + :test + {:source-paths ["src/cljs" "src/cljc" "test/cljs"] + :compiler {:main {{project-ns}}.doo-runner + :asset-path "/js/out" + :output-to "target/test.js" + :output-dir "target/cljstest/public/js/out" + :optimizations :whitespace + :pretty-print true}}{{/test-hook?}} + {{#spec-hook?}} + :test {:source-paths ["src/cljs" "src/cljc" "spec/cljs"] + :compiler {:output-to "target/test.js" + :optimizations :whitespace + :pretty-print true}}{{/spec-hook?}} ``` Or use the conditional in the code like so - ```clojure +```clojure ;; See: https://github.com/plexus/chestnut/blob/master/src/leiningen/new/chestnut/src/clj/chestnut/application.clj (defn app-system [config] (component/system-map @@ -39,4 +36,4 @@ :http (-> (new-web-server (:http-port config)) (component/using [:handler])) :server-info (server-info (:http-port config)))) - ``` +``` diff --git a/project.clj b/project.clj index 379b867..b456c7b 100644 --- a/project.clj +++ b/project.clj @@ -1,5 +1,5 @@ -(defproject gen-cli/lein-template "0.1.0" - :description "Simple Leiningen template for creating a simple Clojure CLI." +(defproject gen-cli/lein-template "0.1.1" + :description "Leiningen template with mixed Clojure/Java support." :url "https://github.com/agilecreativity/gen-cli" :license {:name "Eclipse Public License" :url "http://www.eclipse.org/legal/epl-v10.html"}