ContinuumIO/bokeh — pull request #483 by mattpap (2014-04-03 19:57:31+00:00)
Title: Experimental bokehjs build system using sbt (scala)

To start you need JRE 1.6+. Issue `./sbt`. This can take a while on the first run, because this script will fetch sbt (http://www.scala-sbt.org/) then sbt will fetch build dependencies (JavaScript is already in `project/src/main/resources`). In sbt console issue `build` to compile coffeescript, less and eco sources, and copy vendor files to build. You can also issue `deploy` to combine individual files using requirejs and then minify using closure compiler.

This uses Rhino (JavaScript interpreter for JVM), so running requirejs is much slower than in node, but then compilation is done by closure compiler which, in turn, is very fast. In general I work with individual files, so I don't see this as a big issue, because compilation of individual files is quite fast and there is incremental compilation, so we don't have to recompile everything. So, if you issue `build` twice or more it will show you that there are no files to compile. Currently build is linear but compiling files in parallel is possible and will be allowed in future.

Every command can be prefixed with `~`, e.g. `~compile`. This allows to watch files for changes and run specified command whenever there are any changes. Press enter to quit watch. This obviously uses incremental compilation as well.

Note that this is experimental, so there are know issues I will be fixing as time permits.