The idea:
- allow precompilation which outputs a set of compiled cache-busted files and produces a mapping object
{ source_path => compiled name }
- make this mapping available to the production code through the environment variable (good for Heroku)
- still support on-the-fly compilation for the development machine
asset-compilers.coffee
is a adapter module around connect-assets and the "mapping" JSON. Also adds 2 custom compilers - a thin Sass wrapper around the official gem and a Jade compiler for client-side templates
build_assets.coffee
is a CLI script using the previous module to perform the compilation and outputs the mapping JSON to a file. It also directly copies all the assets that do not need compilation
config.coffee
is an example how STATIC_HOST is made available for the application