Install boot. Then, in a terminal:
This will update boot to the latest stable release version. Since boot is pre-release software at the moment, you should do this frequently.
In a terminal do:
boot serve -d target/ watch speak reload cljs-repl cljs -sO none
This builds a pipeline for your project:
serveStarts a local web server. This task comes from the pandeiro/boot-http library.
target/as the document root
watchStarts incremental build loop. Project will be rebuilt when source files change.
speakAudible notification (plays a sound file) for each build iteration, notifying of errors or warnings when appropriate.
-O noneUse optimizations
none(no GClosure compiler pass).
You can view the generated content by opening http://localhost:3000/index.html in your browser.
boot provides a tool called pods that make it possible for multiple independent Clojure classpaths to exist in the same JVM. Task authors can use Maven dependencies without worrying about shadowing or otherwise interfering with the dependencies in other pods.
One downside of pods is that their use results in higher-than-usual memory consumption by the JVM, particularly PermGen.
If you are using Java 7, you may see errors related to PermGen. You can consult the JVM Options wiki page for settings that can help.
You may also consider upgrading to Java 8, as it resolves many PermGen-related issues.
Start Browser REPL
With the build pipeline humming in the background, you can connect to the running nREPL server with either your IDE or at the command line in a new terminal:
boot repl --client
Then, you can start a CLJS REPL:
Reload the page in your browser. Your REPL is now connected to the page.
Copyright © 2014 Adzerk
Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.