A super-quick way to bootstrap a CLJS Reagent project.
Provide a top-level app-view to QuickCLJS and it takes care of the rest (figwheel config, index.html, reloading, etc.)
- Create a
project.clj
with the QuickCLJS dependency, and a reference to your top-level function (reagent component):
(defproject myapp "0.0.1"
:dependencies [[org.clojars.rafd/quickcljs "0.0.2"]]
:quickcljs-view myapp.core/app-view)
- Create that namespace and view (ex.
src/myapp/core.cljs
)
(ns myapp.core)
(defn app-view []
"Hello World")
- Launch a Leiningen REPL:
lein repl
- Require QuickCLJS:
(require 'quickcljs.go)
-
Navigate to the printed server URL (a random available port is chosen the first time you run)
-
Enjoy!
-
To stop or restart the build:
(quickcljs.go/stop!)
(quickcljs.go/start!)