Create figwheel projectsλ︎
clj-new uses the Leiningen template format and some template developers will include project configuration for Clojure CLI. Each template designer is responsibility as to which project and build tools it supports.
The figwheel-main template provides an option to create a Leiningen or Clojure CLI project and clj-new will create a Clojure CLI configuration by default.
Where a template only provides a Leiningen configuration, dependencies listed in
project.clj
should be added to the:deps
section ofdeps.edn
.dev-dependencies
inproject.clj
should be satisfied by aliases in the project or user-leveldeps.edn
configuration.
ClojureScript project using figwheelλ︎
Use the figwheel-main template to create a ClojureScript project that uses figwheel-main to manage the build.
In a terminal, use the following command:
:project/new alias
The :project/new
alias is defined in Practicalli Clojure CLI config and supports -M
, -X
and T
execution flags.
The -X
and -T
flags use a command with key value arguments. Strings and Clojure data structures (vector, hash-map) should be surrounded with single quotes
Practicalli Templates - Landing page
Practicalli Templates includes a :template/landing-page
template that creates a working landing page ClojureScript project with figwheel-main.
:project/create
alias is defined in Practicalli Clojure CLI config
The practicalli/hello-world
defines the main application namespace as hello-world
and practicalli
as the domain.
--
after the name tells clj-new to pass the following text to the template.
--reagent
is a template option to add reagent React-style library dependencies to the generated project. --rum
and --react
are other React-style libraries that could be used instead of --reagent