var path = require('path');
var defaults = require('./lib/default-options');
module.exports = {
name: 'broccoli-asset-rev',
initializeOptions: function() {
var defaultOptions = {
enabled: this.app.env === 'production',
exclude: defaults.exclude,
extensions: defaults.extensions,
prepend: defaults.prepend,
replaceExtensions: defaults.replaceExtensions
};
// Allow simply setting { fingerprint: false } as a shortcut option to disable
if (this.app.options.fingerprint === false) {
this.options = this.app.options.fingerprint = { enabled: false };
} else {
this.options = this.app.options.fingerprint = this.app.options.fingerprint || {};
}
for (var option in defaultOptions) {
if (!this.options.hasOwnProperty(option)) {
this.options[option] = defaultOptions[option];
}
}
},
postprocessTree: function (type, tree) {
if (type === 'all' && this.options.enabled) {
tree = require('./lib/asset-rev')(tree, this.options);
}
return tree;
},
included: function (app) {
this.app = app;
this.initializeOptions();
},
treeFor: function() {}
}
# |
Change |
User |
Description |
Committed |
|
#1
|
23539 |
jenbottom |
Adding the basic code for ember test appk, created with 'ember new' command |
|
|