A ClojureScript project should contain dependencies for the Clojure and ClojureScript libraries, which are managed by the build tool (Clojure CLI tools or Leiningen) just like any other dependency.
figwheel-main provides additional tooling for REPL driven development, including live updates to the browser REPL and test runner.
Figwheel Main builds your ClojureScript code and automatically loads saved changes as you are coding!
figwheel is the older version of figwheel-main. The configuration between the two versions is incompatible, however, the ClojureScript code should work when migrated to a figwheel-main project configuration.
Figwheel template & options
figwheel-main template creates a Clojurescript project with configuration to run the Figwheel-main build tool.
The figwheel-main template takes several options,
--om, each of which creates a basic project with the respective libraries.
-- between the project name and
--reagent option ensures this option is passed to the template, rather than being passed to Leiningen itself.
Working with Editors
Most Clojure aware editors support ClojureScript too.
Ensure project runs locally before running from an editor
Running a ClojureScript project on the command line is a quick way to ensure everything is working before considering running the project via an editor.
- Interactive programming Flappy Birds in ClojureScript
- Clojure West 2015 - Developing ClojureScript with Figwheel
Hint ClojureScript uses the Google Closure compiler and build tools that require a Java Virtual machine. However, work is in progress to make ClojureScript self hosting. See articles such as ClojureScript Next and Bootstrapped ClojureScript FAQ for pro's and con's of this approach.