UNPKG

ember-cli-ajh

Version:

Command line tool for developing ambitious ember.js apps

34 lines (26 loc) 873 B
'use strict'; var Filter = require('broccoli-filter'); function DummyFilter(inputTree, options) { Filter.call(this, inputTree, options); } DummyFilter.prototype = Object.create(Filter.prototype); DummyFilter.prototype.constructor = DummyFilter; DummyFilter.prototype.extensions = ['js']; DummyFilter.prototype.targetExtension = 'js'; DummyFilter.prototype.processString = function (string, relativePath) { return string.replace(/__SECOND_PREPROCESSOR_REPLACEMENT_TOKEN__/, 'replacedByPreprocessor'); }; module.exports = { name: 'second-dummy-preprocessor', setupPreprocessorRegistry: function(type, registry) { if (type !== 'parent') { return; } var plugin = { name: 'second-dummy-preprocessor', ext: 'js', toTree: function(tree) { return new DummyFilter(tree, {}); } }; registry.add('js', plugin); } };