broccoli-prepend-commit
A broccoli plugin to prepend git commit hash of the source at top of all built html, css and js files. The present HEAD commit hash of your project will be added to the top of all built html, css and js files
Installation
yarn add broccoli-prepend-commit
How to use?
Then use it as plugin in your brocfile.js
(or any equivalent built config that uses broccoli)
const bpc = require('broccoli-prepend-commit');
const tree = 'root';
module.exports = bpc(tree);
For ember-cli-build.js
'use strict';
const EmberApp = require('ember-cli/lib/broccoli/ember-app');
const bpc = require('broccoli-prepend-commit')
module.exports = function(defaults) {
let app = new EmberApp(defaults, {
});
return bpc(app.toTree())
};