1.0.0 • Published 5 years ago
webpack-plugin-run-shell-command v1.0.0
webpack-plugin-run-shell-command
Webpack plugin to run shell command, use child_process.spawn
.
Install
npm i -D webpack-plugin-run-shell-command
Usage
In your webpack.config.js
:
const RunShellCommand = require('webpack-plugin-run-shell-command')
module.exports = {
plugins: [
new RunShellCommand({
before: {
command: 'echo',
args: ['-n', 'Before', 'run'],
options: {
cwd: __dirname
}
},
after: {
command: 'echo',
args: ['-n', 'After', 'run'],
options: {
cwd: __dirname
}
},
done: {
command: 'echo',
args: ['-n', 'All', 'done'],
options: {
cwd: __dirname
}
}
})
]
}
See child_process.spwan documents.
1.0.0
5 years ago