@@ -47,10 +47,7 @@ webpack-cli offers a variety of commands to make working with webpack easier. By
47
47
| [ ` build ` ] ( #build ) | ` build\|bundle\|b [entries...] [options] ` | Run webpack (default command, can be omitted). |
48
48
| [ ` configtest ` ] ( #configtest ) | ` configtest\|t [config-path] ` | Validate a webpack configuration. |
49
49
| [ ` help ` ] ( #help ) | ` help\|h [command] [option] ` | Display help for commands and options. |
50
- | [ ` info ` ] ( #info ) | ` info\|i [options] ` | Outputs information about your system. |
51
- | [ ` init ` ] ( #init ) | ` init\|create\|c\|new\|n [generation-path] [options] ` | Initialize a new webpack project. |
52
- | [ ` loader ` ] ( #loader ) | ` loader\|l [output-path] [options] ` | Scaffold a loader. |
53
- | [ ` plugin ` ] ( #plugin ) | ` plugin\|p [output-path] [options] ` | Scaffold a plugin. |
50
+ | [ ` info ` ] ( #info ) | ` info\|i [options] ` | Outputs information about your system. |
54
51
| [ ` serve ` ] ( #serve ) | ` serve\|server\|s [options] ` | Run the ` webpack-dev-server ` . |
55
52
| [ ` version ` ] ( #version ) | ` version\|v [commands...] ` | Output the version number of ` webpack ` , ` webpack-cli ` and ` webpack-dev-server ` . |
56
53
| [ ` watch ` ] ( #watch ) | ` watch\|w [entries...] [options] ` | Run webpack and watch for files changes. |
@@ -71,16 +68,22 @@ npx webpack build --config ./webpack.config.js --stats verbose
71
68
72
69
### Init
73
70
74
- Used to initialize a new webpack project.
71
+ Used to initialize a new webpack project using ` create-new-webpack-app ` .
75
72
76
73
``` bash
77
- npx webpack init [generation-path] [options]
74
+ npx create-new- webpack-app [generation-path] [options]
78
75
```
79
76
80
77
** example**
81
78
82
79
``` bash
83
- npx webpack init ./my-app --force --template=default
80
+ npx create-new-webpack-app ./my-app --force --template=default
81
+ ```
82
+
83
+ Alias to:
84
+
85
+ ``` bash
86
+ npx create-new-webpack-app init ./my-app --force --template=default
84
87
```
85
88
86
89
#### Generation Path
@@ -101,20 +104,25 @@ Name of template to generate.
101
104
102
105
To generate a project without questions. When enabled, the default answer for each question will be used.
103
106
104
- T> See the [ full documentation of ` webpack init ` command] ( https://github.com/webpack/webpack-cli/blob/master/packages/generators/INIT.md ) .
107
+ #### Templates supported
108
+
109
+ - ` --template=default ` - Default template with basic configuration.
110
+ - ` --template=react ` - Template with React configuration.
111
+ - ` --template=vue ` - Template with Vue configuration.
112
+ - ` --template=svelte ` - Template with Svelte configuration.`
105
113
106
114
### Loader
107
115
108
116
Scaffold a loader.
109
117
110
118
``` bash
111
- npx webpack loader [output-path] [options]
119
+ npx create-new- webpack-app loader [output-path] [options]
112
120
```
113
121
114
122
** example**
115
123
116
124
``` bash
117
- npx webpack loader ./my-loader --template=default
125
+ npx create-new- webpack-app loader ./my-loader --template=default
118
126
```
119
127
120
128
#### Output Path
@@ -134,13 +142,13 @@ Type of template.
134
142
Scaffold a plugin.
135
143
136
144
``` bash
137
- npx webpack plugin [output-path] [options]
145
+ npx create-new- webpack-app plugin [output-path] [options]
138
146
```
139
147
140
148
** example**
141
149
142
150
``` bash
143
- npx webpack plugin ./my-plugin --template=default
151
+ npx create-new- webpack-app plugin ./my-plugin --template=default
144
152
```
145
153
146
154
#### Output Path
@@ -155,6 +163,8 @@ Path to the output directory, e.g. `./plugin-name`.
155
163
156
164
Type of template.
157
165
166
+ T> See the [ full documentation of ` create-new-webpack-app ` ] ( https://github.com/webpack/webpack-cli/blob/master/packages/create-webpack-app/README.md ) .
167
+
158
168
### Info
159
169
160
170
Outputs information about your system.
0 commit comments