UNPKG

ember-cli-ajh

Version:

Command line tool for developing ambitious ember.js apps

34 lines (26 loc) 889 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(/__FIRST_PREPROCESSOR_REPLACEMENT_TOKEN__/, '__SECOND_PREPROCESSOR_REPLACEMENT_TOKEN__'); }; module.exports = { name: 'first-dummy-preprocessor', setupPreprocessorRegistry: function(type, registry) { if (type !== 'parent') { return; } var plugin = { name: 'first-dummy-preprocessor', ext: 'js', toTree: function(tree) { return new DummyFilter(tree, {}); } }; registry.add('js', plugin); } };