Skip to content

Commit

Permalink
Use README.md instead of README.org
Browse files Browse the repository at this point in the history
- For better cljdoc support
  • Loading branch information
agilecreativity committed Sep 2, 2019
1 parent 0d30e14 commit 3e95eef
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 31 deletions.
18 changes: 10 additions & 8 deletions README.org → 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
Expand All @@ -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

Expand Down
39 changes: 18 additions & 21 deletions 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
Expand All @@ -39,4 +36,4 @@
:http (-> (new-web-server (:http-port config))
(component/using [:handler]))
:server-info (server-info (:http-port config))))
```
```
4 changes: 2 additions & 2 deletions 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"}
Expand Down

0 comments on commit 3e95eef

Please sign in to comment.