All Projects → fdaciuk → spawn-webpack-plugin

fdaciuk / spawn-webpack-plugin

Licence: other
Run terminal commands with webpack

Programming Languages

javascript
184084 projects - #8 most used programming language

Spawn Webpack Plugin

Run terminal commands with webpack

Installation

yarn add --dev spawn-webpack-plugin

or using NPM:

npm i --save-dev spawn-webpack-plugin

Usage

Inside a webpack.config.js file, on plugins entry, add:

const SpawnPlugin = require('spawn-webpack-plugin')

// your config...

plugins: [
  // your plugins...
  new SpawnPlugin({
    command: 'yarn lint', // Required. Just put a valid command you can run on terminal
    sync: true, // Optional. `false` by default
    spawn: require('cross-spawn') // Optional. Just use it if you want to use another version of `require('child_process').spawn`
  })
]

License

MIT © Fernando Daciuk

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].