Install the plugin via npm with npm install --save-dev replace-brunch
.
module.exports = {
plugins: {
replace: {
encoding: 'utf8',
log: true,
mapping: {
'date': (new Date()).toISOString(),
'timestamp': Math.floor(Date.now() / 1000)
},
paths: [
'public/index.html',
'public/js/app.js'
],
replacePrefix: '{!',
replaceSuffix: '!}'
}
}
};