Skip to content

Latest commit

 

History

History
59 lines (38 loc) · 1.06 KB

README.md

File metadata and controls

59 lines (38 loc) · 1.06 KB

webpack-cli init

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 init

To generate default configs

npx webpack-cli init --auto

Via custom scaffold

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