Skip to content

Commit 109381e

Browse files
committed
doc: update cli documentation for create-webpack-app
1 parent 36a19cd commit 109381e

File tree

1 file changed

+15
-8
lines changed

1 file changed

+15
-8
lines changed

src/content/api/cli.mdx

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -71,16 +71,16 @@ npx webpack build --config ./webpack.config.js --stats verbose
7171

7272
### Init
7373

74-
Used to initialize a new webpack project.
74+
Used to initialize a new webpack project using `@webpack-cli/create-webpack-app`.
7575

7676
```bash
77-
npx webpack init [generation-path] [options]
77+
npx create-webpack-app init [generation-path] [options]
7878
```
7979

8080
**example**
8181

8282
```bash
83-
npx webpack init ./my-app --force --template=default
83+
npx create-webpack-app init ./my-app --force --template=default
8484
```
8585

8686
#### Generation Path
@@ -101,20 +101,25 @@ Name of template to generate.
101101

102102
To generate a project without questions. When enabled, the default answer for each question will be used.
103103

104-
T> See the [full documentation of `webpack init` command](https://github.com/webpack/webpack-cli/blob/master/packages/generators/INIT.md).
104+
#### Templates supported
105+
106+
- `--template=default` - Default template with basic configuration.
107+
- `--template=react` - Template with React configuration.
108+
- `--template=vue` - Template with Vue configuration.
109+
- `--template=svelte` - Template with Svelte configuration.`
105110

106111
### Loader
107112

108113
Scaffold a loader.
109114

110115
```bash
111-
npx webpack loader [output-path] [options]
116+
npx create-webpack-app loader [output-path] [options]
112117
```
113118

114119
**example**
115120

116121
```bash
117-
npx webpack loader ./my-loader --template=default
122+
npx create-webpack-app loader ./my-loader --template=default
118123
```
119124

120125
#### Output Path
@@ -134,13 +139,13 @@ Type of template.
134139
Scaffold a plugin.
135140

136141
```bash
137-
npx webpack plugin [output-path] [options]
142+
npx create-webpack-app plugin [output-path] [options]
138143
```
139144

140145
**example**
141146

142147
```bash
143-
npx webpack plugin ./my-plugin --template=default
148+
npx create-webpack-app plugin ./my-plugin --template=default
144149
```
145150

146151
#### Output Path
@@ -155,6 +160,8 @@ Path to the output directory, e.g. `./plugin-name`.
155160

156161
Type of template.
157162

163+
T> See the [full documentation of `create-webpack-app`](https://github.com/webpack/webpack-cli/blob/master/packages/create-webpack-app/README.md).
164+
158165
### Info
159166

160167
Outputs information about your system.

0 commit comments

Comments
 (0)