/src/leiningen/new/reagent_figwheel/README.md
https://github.com/gadfly361/reagent-figwheel · Markdown · 106 lines · 70 code · 36 blank · 0 comment · 0 complexity · 90770307ea9000e83c02adb35dd8c852 MD5 · raw file
- # {{name}}
- A [reagent](https://github.com/reagent-project/reagent) application designed to ... well, that part is up to you.
- ## Development Mode
- {{#devtools?}}### cljs-devtools
- To enable:
- 1. Open Chrome's DevTools,`Ctrl-Shift-i`
- 2. Open "Settings", `F1`
- 3. Check "Enable custom formatters" under the "Console" section
- 4. close and re-open DevTools
- {{/devtools?}}
- {{#cider?}}### Start Cider from Emacs:
- Put this in your Emacs config file:
- ```
- (setq cider-cljs-lein-repl "(do (use 'figwheel-sidecar.repl-api) (start-figwheel!) (cljs-repl))")
- ```
- Navigate to a clojurescript file and start a figwheel REPL with `cider-jack-in-clojurescript` or (`C-c M-J`)
- {{/cider?}}
- {{#garden?}}### Compile css:
- Compile css file once.
- ```
- lein garden once
- ```
- Automatically recompile css file on change.
- ```
- lein garden auto
- ```
- {{/garden?}}{{#less?}}### Compile css:
- Compile css file once.
- ```
- lein less once
- ```
- Automatically recompile css file on change.
- ```
- lein less auto
- ```
- {{/less?}}
- ### Run application:
- ```
- lein clean
- lein figwheel dev
- ```
- Figwheel will automatically push cljs changes to the browser.
- Wait a bit, then browse to [http://localhost:3449](http://localhost:3449).
- {{#test?}}### Run tests:
- ```
- lein clean
- lein doo phantom test once
- ```
- The above command assumes that you have [phantomjs](https://www.npmjs.com/package/phantomjs) installed. However, please note that [doo](https://github.com/bensu/doo) can be configured to run cljs.test in many other JS environments (chrome, ie, safari, opera, slimer, node, rhino, or nashorn).
- {{/test?}}
- {{#devcards?}}### Devcards
- ```
- lein clean
- lein figwheel devcards
- ```
- Figwheel will automatically push cljs changes to the browser.
- Wait a bit, then browse to [http://localhost:3449/cards.html](http://localhost:3449/cards.html).
- ---
- To build a minified version:
- ```
- lein clean
- lein cljsbuild once hostedcards
- ```
- Then open *resources/public/cards.html*
- {{/devcards?}}
- ## Production Build
- ```
- lein clean
- lein cljsbuild once min
- ```