new-webpack
A CLI to create new Webpack plugins and loaders
Installation
Requirements
node
>= v10npm
>= v5
new-webpack
can either be installed globally or used with npx
. It's recommended to use npx
as the CLI is intended to be used once to create a new Webpack plugin or loader.
npm install --save-dev -g new-webpack
npx new-webpack
Usage
npx new-webpack <args>
The following arguments are available
argument | description |
---|---|
--plugin |
create a new Webpack plugin |
--loader |
create a new Webpack loader |
--js |
create the Webpack extension in JavaScript |
--ts |
create the Webpack extension in TypeScript |
If the arguments are invalid or missing the CLI will prompt for arguments.
Example
Create a Webpack loader in JavaScript
npx new-webpack --js --loader
Create a Webpack plugin in TypeScript
npx new-webpack --ts --plugin
Create a Webpack extension in JavaScript but prompt for type of extension
npx new-webpack --js
Contributing
If you want to contribute and make our project better, your help is very welcome.