Skip to content

Commit 30dd10d

Browse files
Rossipedia bugfix/yargs command (#422)
* use yargs.command instead of yargs.option for sub-commands * cli(node): Add node flags to CLI (#377) * feat: add support for node flags * tests: Fix node-flags test * misc: Fix test failing due to not-found webpack-cli * misc: remove comment * misc: refactor removing unecessary args * tests: add more tests to prevent argument collision * cli(cmds): remove strict * fix(node): remove node option for now
1 parent bd16440 commit 30dd10d

File tree

2 files changed

+2
-49
lines changed

2 files changed

+2
-49
lines changed

bin/config-yargs.js

Lines changed: 1 addition & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ const OUTPUT_GROUP = "Output options:";
66
const ADVANCED_GROUP = "Advanced options:";
77
const RESOLVE_GROUP = "Resolving options:";
88
const OPTIMIZE_GROUP = "Optimizing options:";
9-
const INIT_GROUP = "Initialization:";
109

1110
module.exports = function(yargs) {
1211
yargs
@@ -15,52 +14,6 @@ module.exports = function(yargs) {
1514
.version()
1615
.alias("version", "v")
1716
.options({
18-
init: {
19-
type: "boolean",
20-
describe:
21-
"Initializes a new webpack configuration or loads a" +
22-
"\n" +
23-
"addon if specified",
24-
group: INIT_GROUP
25-
},
26-
migrate: {
27-
type: "boolean",
28-
describe:
29-
"Migrate your webpack configuration from webpack 1 to webpack 2",
30-
group: INIT_GROUP
31-
},
32-
add: {
33-
type: "boolean",
34-
describe: "Adds a webpack component to your configuration file",
35-
group: INIT_GROUP
36-
},
37-
/*
38-
remove: {
39-
type: "boolean",
40-
describe: "Removes a webpack component to your configuration file",
41-
group: INIT_GROUP
42-
},
43-
update: {
44-
type: "boolean",
45-
describe: "Updates a webpack component to your configuration file",
46-
group: INIT_GROUP
47-
},
48-
make: {
49-
type: "boolean",
50-
describe: "Converts a webpack configuration to a makefile",
51-
group: INIT_GROUP
52-
},
53-
*/
54-
"generate-loader": {
55-
type: "boolean",
56-
describe: "Generates a new webpack loader project",
57-
group: INIT_GROUP
58-
},
59-
"generate-plugin": {
60-
type: "boolean",
61-
describe: "Generates a new webpack plugin project",
62-
group: INIT_GROUP
63-
},
6417
config: {
6518
type: "string",
6619
describe: "Path to the config file",
@@ -365,6 +318,5 @@ module.exports = function(yargs) {
365318
"shortcut for --optimize-minimize --define process.env.NODE_ENV=\"production\"",
366319
group: BASIC_GROUP
367320
}
368-
})
369-
.strict();
321+
});
370322
};

bin/webpack.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@
5353
Usage: webpack-cli [options]
5454
webpack-cli [options] --entry <entry> --output <output>
5555
webpack-cli [options] <entries...> --output <output>
56+
webpack-cli <command> [options]
5657
5758
For more information, see https://webpack.js.org/api/cli/.`);
5859

0 commit comments

Comments
 (0)