Project configurationλ︎
A new project is created in the hello-world directory and contains a deps.edn configuration
{:deps {org.clojure/clojure {:mvn/version "1.10.0"}
org.clojure/clojurescript {:mvn/version "1.11.4"}
cljsjs/react {:mvn/version "17.0.2-0"}
cljsjs/react-dom {:mvn/version "17.0.2-0"}
reagent/reagent {:mvn/version "1.1.1" }}
:paths ["src" "resources"]
:aliases {:fig {:extra-deps
{com.bhauman/rebel-readline-cljs {:mvn/version "0.1.4"}
org.slf4j/slf4j-nop {:mvn/version "1.7.30"}
com.bhauman/figwheel-main {:mvn/version "0.2.17"}}
:extra-paths ["target" "test"]}
:build {:main-opts ["-m" "figwheel.main" "-b" "dev" "-r"]}
:min {:main-opts ["-m" "figwheel.main" "-O" "advanced" "-bo" "dev"]}
:test {:main-opts ["-m" "figwheel.main" "-co" "test.cljs.edn" "-m" "practicalli.test-runner"]}}}
Aliases were added by the template to run figwheel and build the ClojureScript code:
:figadds figwheel-main and rebel-readline libraries as dependencies, slf4j-nop provides a no-operation logger (suppresses default logger warning):buildruns figwheel-main which generates JavaScript from the ClojureScript code in the project:mincreates a minified single JavaScript file for deployment:testruns all tests undertests/practicallidirectory using the figwheel-main test-runner
dev.cljs.edn is the build configuration referred to by the :build and :min aliases using the dev name
^{:watch-dirs ["test" "src"]
:css-dirs ["resources/public/css"]
:auto-testing true
}
{:main practicalli.hello-world}
:watch-dirsdefines the directories to monitor files for saved changes:css-dirsdefines the location of the CSS configuration:auto-testngto automatically discover and run tests:maindefines the main namespace for the application