Keywords are not
Externs are needed by the Closure Compiler. ClojureScript produces them by default.
For 3rd party JS libraries, we need to create them.
http://cljsjs.github.io/ provides some pre-bundled stuff, including externs:
There is also an
:infer-externs true compiler flag. This is black magic and may not work.
We also need to set
(set! *warn-on-infer* true) in the files where we use a 3rd party JS library.
Then, if we see any warnings, we can provide a type hint to finish off.
If this gets complicated, we should write out own externs file.
This contains globals like
Ratio, BigDecimal, BigInteger not supported.
Different in complicated ways.
Every namespace matches a file.
There is a separate macro expansion phase.
FigWheel is a nice debugging in the browser thing for ClojureScript.
It starts a web server, and automatically hot-reloads the browser page as your modify your ClojureScript.
You need to add the
lein-figwheel plugin in your project.clj.
Then you can run
lein figwheel to start the server.
It depends on you writing your ClojureScript files such that they can be reloaded.
Also, maybe it can work with Figwheel? Not sure if any integration is actually needed there?