1.0.14 • Published 7 years ago
semver-webpack-plugin v1.0.14
semver-webpack-plugin
A webpack plugic to do semver
Features
- Bump up
version
using functionsemver.inc
fields in json files, ex:package.json
,bower.json
- Support command line
arguments
orconfig
- Enable/disable by
arguments
- More comming...
Dependencies
These dependencies should be installed via npm
semver
latestcommand-line-args
latest
Installation
npm install semver-webpack-plugin --save-dev
Webpack example
- webpack.config.js
var SemverWebpackPlugin = require('semver-webpack-plugin');
module.exports = {
plugins: [
new SemverWebpackPlugin({
files: [path.resolve(__dirname, "package.json")]
})
]
}
- Gruntfile.js
grunt.initConfig({
webpack: {
build: webpackConfig
}
});
- package.json
{
"scripts": {
"build": "grunt build --semver-webpack-plugin-disable",
"dev": "webpack-dev-server --progress --colors",
"build-major": "grunt build --semver-webpack-plugin-inc-args=major",
"build-minor": "grunt build --semver-webpack-plugin-inc-args=minor",
"build-beta": "grunt build --semver-webpack-plugin-inc-args=prerelease,beta"
},
"devDependencies": {
"clean-webpack-plugin": "latest",
}
}
Usage
Webpack config
new SemverWebpackPlugin({options})
options
properties:
files
: list of input files, should are absolute pathsincArgs
:arguments
will be passed to functionsemver.inc()
, see node-semverindent
: number of spaces in indentation
Arguments
--semver-webpack-plugin-inc-args
arguments passed to functionsemver.inc
(incsv
format), ex:webpack --semver-webpack-plugin-inc-args=prelease,beta
--semver-webpack-plugin-disable
this is useful tobumpup
version in sometime, see example section above for more infotrue
then the Plugin will not run- Default is
false
License
1.0.14
7 years ago
1.0.13
7 years ago
1.0.12
10 years ago
1.0.11
10 years ago
1.0.10
10 years ago
1.0.9
10 years ago
1.0.8
10 years ago
1.0.7
10 years ago
1.0.6
10 years ago
1.0.5
10 years ago
1.0.4
10 years ago
1.0.3
10 years ago
1.0.2
10 years ago
1.0.2-rc.1
10 years ago
1.0.1-rc.3
10 years ago
1.0.1-rc.2
10 years ago
1.0.1-rc.1
10 years ago
1.0.0
10 years ago