You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Lively monitors compiled JavaScript files for changes and reloads them when they
change, so that you don't have to. This creates a development environment where you can edit ClojureScript code and see the changes
immediately in your browser without needing to refresh the page.
Lively does not compile ClojureScript. (I recommend using lein-cljsbuild for that.)
Lively does not provide web server for serving JavaScript files.
Installation
Add the following Leiningen dependency:
[lively "0.2.1"]
Usage
Prerequisites:
ClojureScript version 0.0-2202 or newer
ClojureScript is compiled with :optimizations set to :none
JavaScript files are loaded over HTTP
Simply include call to lively/start somewhere in your ClojureScript codebase, passing the location of the main JavaScript file
(this is the value of src attribute of the script tag loading the file in your HTML markup):
Lively monitors changes in JavaScript files by making consecutive HEAD requests to the server.
When ClojureScript files are compiled, the main JavaScript file is always is generated again and this change is
noticed by Lively. Lively finds out which namespaces have changed by making HEAD requests for each namespace-specific
JavaScript file and reloads ones that have changed.