Skip to content

Commit f29a170

Browse files
authored
fix(init): fix the invalid package name (#1228)
* fix(init): fix the invalid package name fix invalid package name ISSUES CLOSED: #1227 * docs(init): update init package docs to indicate correct package name update init package docs ISSUES CLOSED: #1227
1 parent 8c3a66d commit f29a170

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

INIT.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
# webpack-cli create
1+
# webpack-cli init
22

3-
`webpack-cli create` is used to initialize `webpack` projects quickly by scaffolding configuration and creating a runnable project with all the dependencies based on the user preferences.
3+
`webpack-cli init` is used to initialize `webpack` projects quickly by scaffolding configuration and creating a runnable project with all the dependencies based on the user preferences.
44

55
## Initial Setup
66

77
### a. Local setup
88

9-
These are the steps necessary to setup `webpack-cli create` locally:
9+
These are the steps necessary to setup `webpack-cli init` locally:
1010

1111
1. Create `package.json` through npm
1212

@@ -28,7 +28,7 @@ These are the steps necessary to setup `webpack-cli create` locally:
2828

2929
### b. Global Setup
3030

31-
These are the steps necessary to setup `webpack-cli create` globally:
31+
These are the steps necessary to setup `webpack-cli init` globally:
3232

3333
1. Install `webpack` and `webpack-cli` globally
3434

@@ -47,13 +47,13 @@ These are the steps necessary to setup `webpack-cli create` globally:
4747
### a. Running locally
4848

4949
```shell
50-
npx webpack-cli create
50+
npx webpack-cli init
5151
```
5252

5353
### b. Running globally
5454

5555
```shell
56-
webpack-cli create
56+
webpack-cli init
5757
```
5858

5959
### Description of questions asked by generator

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -120,14 +120,14 @@ The project also has several utility packages which are used by other commands
120120

121121
## Getting started
122122

123-
When you have followed the [Getting Started](https://webpack.js.org/guides/getting-started/) guide of webpack then webpack CLI is already installed! Otherwise, you would need to install webpack CLI and the packages you want to use. If we want to use the `create` command to create a new `webpack.config.js` configuration file:
123+
When you have followed the [Getting Started](https://webpack.js.org/guides/getting-started/) guide of webpack then webpack CLI is already installed! Otherwise, you would need to install webpack CLI and the packages you want to use. If we want to use the `init` command to create a new `webpack.config.js` configuration file:
124124

125125
```sh
126126
npm i webpack-cli @webpack-cli/init
127127
npx webpack-cli create
128128
```
129129

130-
You will be prompted for some questions about what how you want to generate your config file when running the `create` command so webpack CLI can provide the best fitting configuration.
130+
You will be prompted for some questions about what how you want to generate your config file when running the `init` command so webpack CLI can provide the best fitting configuration.
131131

132132
## webpack CLI Scaffolds
133133

lib/webpack-cli.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const { groups } = require('./utils/cli-flags');
66
const webpackMerge = require('webpack-merge');
77

88
const defaultCommands = {
9-
create: 'init',
9+
init: 'init',
1010
loader: 'generate-loader',
1111
plugin: 'generate-plugin',
1212
info: 'info',

packages/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ This folder is the collection of those packages.
1111
2. [generate-plugin](https://github.com/webpack/webpack-cli/tree/master/packages/generate-plugin)
1212
3. [generators](https://github.com/webpack/webpack-cli/tree/master/packages/generators)
1313
4. [info](https://github.com/webpack/webpack-cli/tree/master/packages/info)
14-
5. [create](https://github.com/webpack/webpack-cli/tree/master/packages/init)
14+
5. [init](https://github.com/webpack/webpack-cli/tree/master/packages/init)
1515
6. [migrate](https://github.com/webpack/webpack-cli/tree/master/packages/migrate)
1616
7. [serve](https://github.com/webpack/webpack-cli/tree/master/packages/serve)
1717
8. [utils](https://github.com/webpack/webpack-cli/tree/master/packages/utils)

0 commit comments

Comments
 (0)