Skip to content

Latest commit

 

History

History
70 lines (50 loc) · 1.03 KB

README.md

File metadata and controls

70 lines (50 loc) · 1.03 KB

Example for shadow-cljs

Usage

Compile ClojureScript into CommonJS JavaScript:

yarn
yarn compile

Browse target/ folder to see the results. You can check CommonJS result with node:

$ node
> require('./target/example.main').main()
App loaded!
null
>
Advanced

Watch and compile:

$ yarn shadow-cljs watch app
$ node
> require('./target/example.main').main()
App loaded!
null
>

Compiled with dead code eliminations:

$ yarn shadow-cljs release app
$ node
> require('./target/release/example.main').main()
App loaded!
null
>

Steps

To setup in a new project:

  • yarn add --dev shadow-cljs
  • configure shadow-cljs.edn
  • compile with commands
For release mode

Notice that in release, in order to build in :advanced, :entries is required:

  {; ...
   :release {:entries [example.main]
             :output-dir "target/release/"}}

And configs of :release will overwrite previous configs.

License

MIT