A webpack plugin to bump the patch number every build
var Bump = require("bump-webpack-plugin");
module.exports = {
plugins: [
new Bump([
'package.json',
'bower.json'
])
]
}
For every file you supply to Bump
, this plugin will add or update two fields: version
and webpackAssetHash
.
The version will only be bumped if two conditions are met:
- webpackAssetHash has changed, i.e. the compiled output is different
- version has not already been changed from its value in git
HEAD
(so this project is git dependent)
Make git dependency optional and find a good git wrapper for NodeJS