bartonj/lein-clojurescript — pull request #9 by jedahu (2012-01-27 20:35:41+00:00)
Title: test, fresh, and clean commands

I've refactored quite a bit. Among other things, the watch loop now runs inside eval-in-project so a new jvm isn't started for each cycle.

The help text now reads:

"lein-clojurescript: Compiles clojurescript (.cljs) files in src to google
closure compatible javascript (.js) files.
Can use as a standalone task or can hook into the normal compile task.
Uses project name or group for outputfile. Accepts the following commandline
arguments:

watch monitor sources and recompile when they change.
test run (apply clojure.java.shell/sh (:cljs-test-cmd project)) after each
compile.
fresh remove output files before doing anything else.
clean remove output files and do nothing else (ignores other args).
{ } an option map to pass to cljs.closure/build.

examples: lein clojurescript
lein clojurescript watch
lein clojurescript fresh '{:output-dir \"myout\" }'
lein compile '{:output-dir \"myout\" \\
:output-to \"bla.js\" \\
:optimizations :advanced}'"