- listFiles and listEntries output is now lexicographically sorted (by related path)
- [REVERT] listFiles and listEntries output is now lexicographically sorted (by related path) ember-cli uses concat inputFiles instead of headerFiles for files which much be ordered
- listFiles and listEntries output is now lexicographically sorted (by related path)
- add plugin.listEntries() – this returns a stat entry result, allowing subclasses access to the underlying stat information
- Performance improvements
- Fix bug
- Performance improvements
- Performance improvements
-
Derive from broccoli-plugin base class, and expose same interface. In particular:
updateCache(srcDirs, destDir)
becomesbuild()
- We no longer derive from CoreObject
- We gain the
name
,annotation
, andpersistentOutput
options options
no longer auto-assigns tothis
; unknown options are ignored
-
filterFromCache.include
/filterFromCache.exclude
are now calledcacheInclude
/cacheExclude
; they must now be passed in throughoptions
, and can no longer be set on the prototype/instance -
Remove
enforceSingleInputTree
option; we now always expect an array
- Bump without changes
- Improve logging
- Ignore changes in directory size/mtime, so that excluded files can be added or removed without causing invalidations
- Use new
.rebuild
API
- Add ability to debug which files are causing an invalidation of the cache. The following will generate output indicating which path changed:
DEBUG=broccoli-caching-writer broccoli serve # if using broccoli-cli
- Update to newer core-object version.
- Ensure that errors are not thrown if
_destDir
has not been setup yet.
- Use
_destDir
for tracking the internal destination directory. This prevents collisions if inheritors use the commondestDir
name as a property.
- Allow easy inheritance. In your package's
index.js
:
var CachingWriter = require('broccoli-caching-writer');
module.exports = CachingWriter.extend({
init: function(inputTrees, options) {
/* do additional setup here */
},
updateCache: function(srcPaths, destDir) {
/* do main processing */
}
});
Then in a consuming Brocfile:
var MyFoo = require('my-foo'); // package from above
var tree = new MyFoo([someInput], { some: 'options' });
- Allow filtering on files to include/exclude when determining when to invalidate the cache. This allows you to use simple regular expressions to prevent invalidating the cache when files that do not affect the tree in question are changed.
var outputTree = compileCompass(inputTree, {
filterFromCache: {
include: [
/.(scss|sass)$/ // only base the input tree’s hash on *.scss and *.sass files
]
}
});
This does not affect what files make it to the output tree at all, rather it only makes it easier for subclasses to only rebuild when file types they care about change.
-
Symlink from cache instead of manually hard-linking. This should be a speed improvement for posix platforms, and will soon be able to take advantage of improvements for Windows (for those curious stay tuned on Windows support here).
-
Allow multiple input trees. If an array of trees is passed to the constructor, all trees will be read and their collective output will be used to calculate the cache (any trees invalidating causes
updateCache
to be called).The default now is to assume that an array of trees is allowed, if you want to opt-out of this behavior set
enforceSingleInputTree
totrue
on your classes prototype.By default an array of paths will now be the first argument to
updateCache
(instead of a single path in prior versions). TheenforceSingleInputTree
property also controls this. -
Due to the changes above (much more being done in our constructor), inheritors are now required to call the
broccoli-caching-writer
constructor from their own.