package
Preprocessor registry used internally by ember-cli.
npm install ember-cli-preprocess-registryGitHub-flavored package documentation.
Across all versions.
Download trend unavailable.
Runtime metadata.
Used by Ember CLI to provide a registry of preprocessors. The main types
used throughout the system are css, template, js.
You can access both your own addon's and your parent's (whichever item is including you)
registry via the setupPreprocessorRegistry hook in your addon's index.js.
Example:
module.exports = {
name: 'special-js-sauce',
setupPreprocessorRegistry(type, registry) {
if (type !== 'parent') { return; }
registry.add('js', {
name: 'special-js-sauce-preprocessor',
toTree() {
// do your thing here....
}
});
}
}Registry.prototype.add(type: String, plugin: Plugin)Adds the provided plugin to the registry for the type specified.
Example:
class SpecialSauce {
get name() { return 'special-sauce'; }
toTree(tree) {
// return new tree after processing
}
}
registry.add('js', new SpecialSauce);Registry.prototype.load(type: String): Plugin[]Returns an array of all plugins that are registered for a given type.
Registry.prototype.extensionsForType(type: String): string[]Returns an array of all known extensions for a given type.
Registry.prototype.remove(type: String, plugin: Plugin)Removes the provided plugin from the specified type listing.
npm install
npm testEstimated unpacked size across 24 packages.
2.3 MB
Includes dependencies.
chadhietala
chadhietala@gmail.com
^3.0.8
4.0.0