quackingduck/emport — pull request #12 by jesstelford (2014-02-03 21:24:51+00:00)
Title: Cache built CoffeeScript files

This avoids unnecessary recompilation of coffeescript files, which makes the build process much much faster, even with the added disk I/O.

General concept:
1. Create a `/build` directory in your project root
2. Tell emport about this directory
3. All compiled coffeescript files are written to this directory as an SHA1 of the file contents + compilation settings
4. Only recompile when `/build` doesn't contain a copy we can use

Adds two new required fields for the options hash:
```
{
'basePath': 'The absolute path to location of build directory'
'build': 'Name of build directory'
}
```

Note that this is a WIP PR - I just wanted to start the discussion around the feature.

TODO:
* Make the caching optional
* Unit tests
* Update docs
* Remove old built files (time-decay maybe?)