This adds new makefile targets and a folder of edn files with compiler options for three different builds.
optimizations :none (with source code pretty-printed)
optimizations :advanced (with source code pretty-printed)
optimizations :advanced (with source code minified)
Uses the :target :bundle compiler option to make use of Webpack for bundling in JS dependencies.
Pulls in all JS dependencies through node_modules and Webpack instead of CLJSJS (foreign libs). Require statements and js-lib usage has been updated accordingly.
Adds a Webpack config file used by the 3 different clojurescript builds
The cljs compilation stage always outputs a out/index.js file, and the webpack stage takes that file and outputs a out/main.js file.
Main concern in review
Is there a better way organize the three different builds in the Makefile? One thing to consider is that there will soon be more builds and more makefile targets for Observable notebooks.
How to test?
Run make js, make js-advanced, or make js-advanced-min to try out the various builds. They will all result in an app you can open with index.html.
What does this do?
This adds new makefile targets and a folder of edn files with compiler options for three different builds. optimizations :none (with source code pretty-printed) optimizations :advanced (with source code pretty-printed) optimizations :advanced (with source code minified)
Uses the
:target :bundle
compiler option to make use of Webpack for bundling in JS dependencies.Pulls in all JS dependencies through node_modules and Webpack instead of CLJSJS (foreign libs). Require statements and js-lib usage has been updated accordingly.
Adds a Webpack config file used by the 3 different clojurescript builds
The cljs compilation stage always outputs a
out/index.js
file, and the webpack stage takes that file and outputs aout/main.js
file.Main concern in review
How to test?
Run
make js
,make js-advanced
, ormake js-advanced-min
to try out the various builds. They will all result in an app you can open withindex.html
.