After this question Modify app.js and vendor.js before the final integrity seal. How to? I’m building an addon for modify the js before the final integrity step (with ember-cli-sri).
lib/modify-js-before-build/index.js
/* eslint-env node */
'use strict';
module.exports = {
name: 'modify-js-before-build',
isDevelopingAddon() {
return true;
},
postprocessTree(type, tree) {
// WHAT TO DO!?
}
};
lib/modify-js-before-build/package.json
{ ...,
"ember-addon": {
"before": "ember-cli-sri"
}
}
But I’m stucked here, I don’t know how to do (I do not know very well broccoli). How can I tell it to add some text in my app.js and vendor.js before ember-cli-sri and other build steps?
I found this one: ember-cli-one-script/index.js at master · DavyJonesLocker/ember-cli-one-script · GitHub. They are using broccoli-concat
and broccoli-merge-trees
. Something similar to me? But how?