Skip to content

Leiningen template for ClojureScript+dmohs/react with figwheel, devtools, and devcards

License

Notifications You must be signed in to change notification settings

dmohs/cljs-react-template

Repository files navigation

cljs-react-template

A Leiningen template for ClojureScript + dmohs/react-cljs.

Includes figwheel, devtools, and devcards for a great development experience.

Usage

Install Leiningen (or use docker as shown below). Then, create a new project from this template:

lein new dmohs.cljs-react myself/my-project --to-dir my-project
cd my-project

Copy index.html into target:

lein resource

Serve the files:

ruby -run -ehttpd target -p8000

(possibly in another shell) Start Figwheel with the Devcards UI:

lein with-profile +devcards figwheel

Once compiling has finished, you should be able to see the Devcards UI here:

http://localhost:8000/

Other Compilation Modes

Note: Do a clean before rebuilding in a different mode or things may break.

Run your application (without Devcards) with Figwheel's hot reloading:

lein with-profile +figwheel do clean, resource, figwheel

Create a deployable build:

lein with-profile deploy do clean, resource, cljsbuild once

Dockerized

Instead of installing Leiningen, you can just use the Clojure docker image:

docker pull clojure

then:

docker run --rm -it -w /work -v "$PWD":/work -v "$HOME"/.m2:/root/.m2 -p 3449:3449 \
  clojure lein figwheel

About

Leiningen template for ClojureScript+dmohs/react with figwheel, devtools, and devcards

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published