- Install Java
- Install Leiningen
lein new figwheel my-app
lein cljsbuild once min
- DONE
- Pull JavaScript dependencies from CLJSJS
- build
- No additional config
- No externs needed
- Not all JS libraries are on CLJSJS
- CLJSJS libraries are pre-built and unoptimized by Closure Compiler
- Since deps code is unoptimized, output bundle size might increase drastically
Basically what CLJSJS packages do for you automatically
- Have JavaScript files locally
- Configure
:foreign-libs
compiler option - Provide externs
- build
- Requires to configure every dependency file and relations between them
- Requires to create and provide externs files
- Foreign libraries code is unoptimized by Closure Compiler
- Since deps code is unoptimized, output bundle size might increase drastically
While these are officially recommened ways to consume JavaScript from ClojureScript, there's a number of experimental tools which are trying to provide a better experience (see shadow-cljs).
One approach that is not described here would be to bundle ClojureScript and JavaScript code separately. But how you do it depends on so many parts, that it doesn't make sense to describe here.