- Support source maps
- Plugin-based compilation
- Perform compilation in memory, not file system.
Key Innovation: Use source map information to determine which changed files result in which files having to be rebuilt.
Source Maps and this innovation concept is why I'm even considering polluting this noisy space even further!
plugin.compile = function(files) {
return files
.filter(function(file) {
return file.name.match(/\.coffee$/);
})
.map(function(file) {
// note we allow an input source map for multi-step builds
var compiled = compile(file.source, file.sourceMap);
file.source = compiled.source;
file.sourceMap = compiled.sourceMap;
return file;
});
}
Deleting files is not provided as an option. We can only add or modify files as specified in the returned files array.
The tool would then watch the input folder, do a build, and selectively rebuild just what changes, having discovered the build dependencies from the source maps.
External API still being worked out exactly.