git-webpack-plugin
Interactive git add, commit, pull, push for webpack
Usage
// webpack v4
// webpack.config.js
const GitPlugin = require('git-webpack-plugin')
module.exports = {
plugins: [
new GitPlugin()
]
}
No further setup is required if a repository is present in the directory, as the plugin relies on the "git" shell commands.
The plugin runs after the compilation process. It will then show the current branch and prompt for a commit message. At this point the git process can also be skipped.
Options
defaultPrefix
Prepends "[<defaultPrefix>] " to the commit message. Can be circumvented by starting the message with "[".
new GitPlugin({
defaultPrefix: 'TASK'
})
commitOnly
Skips pull & push operations.
new GitPlugin({
commitOnly: true
})