|
1 | 1 | const { logger } = require('@webpack-cli/logger'); |
| 2 | +const StatsGroup = require('../groups/StatsGroup'); |
| 3 | + |
2 | 4 | const HELP_GROUP = 'help'; |
3 | 5 | const CONFIG_GROUP = 'config'; |
4 | 6 | const BASIC_GROUP = 'basic'; |
@@ -243,25 +245,25 @@ module.exports = { |
243 | 245 | }, |
244 | 246 | { |
245 | 247 | name: 'prefetch', |
246 | | - usage: '--prefetch <request>', |
| 248 | + usage: 'webpack --prefetch <request>', |
247 | 249 | type: String, |
248 | 250 | group: ADVANCED_GROUP, |
249 | 251 | description: 'Prefetch this request', |
250 | 252 | link: 'https://webpack.js.org/plugins/prefetch-plugin/', |
251 | 253 | }, |
252 | 254 | { |
253 | 255 | name: 'json', |
254 | | - usage: '--json', |
| 256 | + usage: 'webpack --json', |
255 | 257 | type: Boolean, |
256 | 258 | alias: 'j', |
257 | 259 | description: 'Prints result as JSON', |
258 | 260 | group: DISPLAY_GROUP, |
259 | 261 | }, |
260 | 262 | { |
261 | | - name: 'standard', |
262 | | - usage: '--standard', |
| 263 | + name: 'pretty', |
| 264 | + usage: 'webpack --pretty', |
263 | 265 | type: Boolean, |
264 | | - description: 'Prints standard output', |
| 266 | + description: 'Prints a fancy output', |
265 | 267 | group: DISPLAY_GROUP, |
266 | 268 | }, |
267 | 269 | { |
@@ -322,6 +324,27 @@ module.exports = { |
322 | 324 | group: BASIC_GROUP, |
323 | 325 | description: 'NodeJS flags', |
324 | 326 | }, |
| 327 | + { |
| 328 | + name: 'stats', |
| 329 | + usage: 'webpack --stats verbose', |
| 330 | + type: value => { |
| 331 | + if (StatsGroup.validOptions().includes(value)) { |
| 332 | + return value; |
| 333 | + } |
| 334 | + logger.warn('No value recognised for "stats" option'); |
| 335 | + return 'normal'; |
| 336 | + }, |
| 337 | + group: DISPLAY_GROUP, |
| 338 | + description: 'It instructs webpack on how to treat the stats', |
| 339 | + link: 'https://webpack.js.org/configuration/stats/#stats', |
| 340 | + }, |
| 341 | + { |
| 342 | + name: 'verbose', |
| 343 | + usage: 'webpack --verbose', |
| 344 | + type: Boolean, |
| 345 | + group: DISPLAY_GROUP, |
| 346 | + description: 'It tells webpack to output all the information', |
| 347 | + }, |
325 | 348 | /* { |
326 | 349 | name: "analyze", |
327 | 350 | type: Boolean, |
|
0 commit comments