Configure ClojureScript
ClojureScript leverages the Google Closure compiler.[41] The compiler can perform a number of optimizations, such as dead code pruning, to produce lean JavaScript output.
You leverage the Google Closure library to provide a rich API for common tasks, such as handling AJAX requests, managing cookies, currency formatting, and so on.[42] This means that you don’t need to include any additional JavaScript libraries such as jQuery in order to do most tasks.
The easiest way to add ClojureScript support to the project is by using the lein-cljsbuild plugin.[43] The plugin will compile the ClojureScript sources and output the resulting JavaScript in the specified location.
Get Web Development with Clojure, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.