Skip to content

Commit

Permalink
fix(init): fix the invalid package name (#1228)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
anshumanv authored Feb 16, 2020
1 parent 8c3a66d commit f29a170
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
12 changes: 6 additions & 6 deletions INIT.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# webpack-cli create
# webpack-cli init

`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.
`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.

## Initial Setup

### a. Local setup

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

1. Create `package.json` through npm

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

### b. Global Setup

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

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

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

```shell
npx webpack-cli create
npx webpack-cli init
```

### b. Running globally

```shell
webpack-cli create
webpack-cli init
```

### Description of questions asked by generator
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,14 +120,14 @@ The project also has several utility packages which are used by other commands

## Getting started

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:
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:

```sh
npm i webpack-cli @webpack-cli/init
npx webpack-cli create
```

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.
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.

## webpack CLI Scaffolds

Expand Down
2 changes: 1 addition & 1 deletion lib/webpack-cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const { groups } = require('./utils/cli-flags');
const webpackMerge = require('webpack-merge');

const defaultCommands = {
create: 'init',
init: 'init',
loader: 'generate-loader',
plugin: 'generate-plugin',
info: 'info',
Expand Down
2 changes: 1 addition & 1 deletion packages/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ This folder is the collection of those packages.
2. [generate-plugin](https://github.com/webpack/webpack-cli/tree/master/packages/generate-plugin)
3. [generators](https://github.com/webpack/webpack-cli/tree/master/packages/generators)
4. [info](https://github.com/webpack/webpack-cli/tree/master/packages/info)
5. [create](https://github.com/webpack/webpack-cli/tree/master/packages/init)
5. [init](https://github.com/webpack/webpack-cli/tree/master/packages/init)
6. [migrate](https://github.com/webpack/webpack-cli/tree/master/packages/migrate)
7. [serve](https://github.com/webpack/webpack-cli/tree/master/packages/serve)
8. [utils](https://github.com/webpack/webpack-cli/tree/master/packages/utils)
Expand Down

0 comments on commit f29a170

Please sign in to comment.