This repository was archived by the owner on May 25, 2019. It is now read-only.
jsnext support
PR #30:
Fixes #25 - logs
- relied on
debug()to log locator warnings - moved logic to dedupe duplicates into its own method for better testing
Fixes #27 - method deprecation:
* listAllResources() -> getAllResources()
* listBundleNames() -> getBundleNames()
PR #29:
Fixes #25 - support rulesets generation thru rulesetFn configuration
This will allow us to do something like:
var locator = new Locator({
rulesetFn: function (bundle) {
if (bundle.pkg && bundle.pkg['jsnext:main']) {
return { /* create synthetic rules for ES6 packages */ };
}
}
});Fixes filter behavior by allowing falsy filter value and empty object {} as filters that will pass for all files and resources, but fails if there is a key in the filter object that doesn't match extensions or types. You can now do:
locator.getBundleResources('foo'); // return all resources in bundle
locator.getBundleResources('foo', {}); // return all resources in bundle
locator.getBundleResources('foo', { crazy: 1 }); // return no resources
locator.getBundleResources('foo', { types: 'model' }); // return model resources