Skip to content

Latest commit

 

History

History
60 lines (38 loc) · 1.08 KB

README.md

File metadata and controls

60 lines (38 loc) · 1.08 KB

webpack-cli create

NPM Downloads

Description

This package contains the logic to create a new webpack configuration.

Installation

npm i -D webpack-cli @webpack-cli/init

Usage

To run the package programmatically, install it as a dependency. When using the package programmatically, one does not have to install webpack-cli.

Node

const init = require('@webpack-cli/init').default;

// this will run the default init instance
init();

// we're slicing node.process, ...myPacakges is a webpack-scaffold name/path
init([null, null, ...myPacakges]);

CLI (via webpack-cli)

Via defaults

npx webpack-cli create

To generate default configs

npx webpack-cli create --auto

Via custom scaffold

  1. Using package on npm
npx webpack-cli create webpack-scaffold-[name]
  1. Using path to a local directory
npx webpack-cli create [path]