Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: generation of negative flags #2555

Merged
merged 5 commits into from Mar 26, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 8 additions & 4 deletions packages/webpack-cli/lib/webpack-cli.js
Expand Up @@ -363,7 +363,8 @@ class WebpackCLI {
alias: 'm',
configs: [
{
type: 'boolean',
type: 'enum',
values: [true],
},
],
description: "Merge two or more configurations using 'webpack-merge'.",
Expand Down Expand Up @@ -430,7 +431,8 @@ class WebpackCLI {
name: 'analyze',
configs: [
{
type: 'boolean',
type: 'enum',
values: [true],
},
],
multiple: false,
Expand All @@ -443,7 +445,8 @@ class WebpackCLI {
type: 'string',
},
{
type: 'boolean',
type: 'enum',
values: [true],
},
],
description: 'Print compilation progress during build.',
Expand All @@ -466,7 +469,8 @@ class WebpackCLI {
type: 'string',
},
{
type: 'boolean',
type: 'enum',
values: [true],
},
],
alias: 'j',
Expand Down
24 changes: 0 additions & 24 deletions test/help/__snapshots__/help.test.js.snap.webpack4
Expand Up @@ -69,13 +69,10 @@ Options:
-c, --config <value...> Provide path to a webpack configuration file e.g. ./webpack.config.js.
--config-name <value...> Name of the configuration to use.
-m, --merge Merge two or more configurations using 'webpack-merge'.
--no-merge Negative 'merge' option.
--env <value...> Environment passed to the configuration when it is a function.
--node-env <value> Sets process.env.NODE_ENV to the specified value.
--progress [value] Print compilation progress during build.
--no-progress Negative 'progress' option.
-j, --json [value] Prints result as JSON or store it in a file.
--no-json Negative 'json' option.
--entry <value...> The entry point(s) of your application e.g. ./src/main.js.
-o, --output-path <value> Output location of the file generated by webpack e.g. ./dist/.
-t, --target <value> Sets the build target e.g. node.
Expand Down Expand Up @@ -125,13 +122,10 @@ Options:
-c, --config <value...> Provide path to a webpack configuration file e.g. ./webpack.config.js.
--config-name <value...> Name of the configuration to use.
-m, --merge Merge two or more configurations using 'webpack-merge'.
--no-merge Negative 'merge' option.
--env <value...> Environment passed to the configuration when it is a function.
--node-env <value> Sets process.env.NODE_ENV to the specified value.
--progress [value] Print compilation progress during build.
--no-progress Negative 'progress' option.
-j, --json [value] Prints result as JSON or store it in a file.
--no-json Negative 'json' option.
--entry <value...> The entry point(s) of your application e.g. ./src/main.js.
-o, --output-path <value> Output location of the file generated by webpack e.g. ./dist/.
-t, --target <value> Sets the build target e.g. node.
Expand Down Expand Up @@ -181,13 +175,10 @@ Options:
-c, --config <value...> Provide path to a webpack configuration file e.g. ./webpack.config.js.
--config-name <value...> Name of the configuration to use.
-m, --merge Merge two or more configurations using 'webpack-merge'.
--no-merge Negative 'merge' option.
--env <value...> Environment passed to the configuration when it is a function.
--node-env <value> Sets process.env.NODE_ENV to the specified value.
--progress [value] Print compilation progress during build.
--no-progress Negative 'progress' option.
-j, --json [value] Prints result as JSON or store it in a file.
--no-json Negative 'json' option.
--entry <value...> The entry point(s) of your application e.g. ./src/main.js.
-o, --output-path <value> Output location of the file generated by webpack e.g. ./dist/.
-t, --target <value> Sets the build target e.g. node.
Expand Down Expand Up @@ -238,14 +229,11 @@ Options:
--config-name <value...> Name of the configuration to use.
-m, --merge Merge two or more configurations using
'webpack-merge'.
--no-merge Negative 'merge' option.
--env <value...> Environment passed to the configuration when it is
a function.
--node-env <value> Sets process.env.NODE_ENV to the specified value.
--progress [value] Print compilation progress during build.
--no-progress Negative 'progress' option.
-j, --json [value] Prints result as JSON or store it in a file.
--no-json Negative 'json' option.
--entry <value...> The entry point(s) of your application e.g.
./src/main.js.
-o, --output-path <value> Output location of the file generated by webpack
Expand Down Expand Up @@ -413,14 +401,11 @@ Options:
--config-name <value...> Name of the configuration to use.
-m, --merge Merge two or more configurations using
'webpack-merge'.
--no-merge Negative 'merge' option.
--env <value...> Environment passed to the configuration when it
is a function.
--node-env <value> Sets process.env.NODE_ENV to the specified value.
--progress [value] Print compilation progress during build.
--no-progress Negative 'progress' option.
-j, --json [value] Prints result as JSON or store it in a file.
--no-json Negative 'json' option.
--entry <value...> The entry point(s) of your application e.g.
./src/main.js.
-o, --output-path <value> Output location of the file generated by webpack
Expand Down Expand Up @@ -498,14 +483,11 @@ Options:
--config-name <value...> Name of the configuration to use.
-m, --merge Merge two or more configurations using
'webpack-merge'.
--no-merge Negative 'merge' option.
--env <value...> Environment passed to the configuration when it is
a function.
--node-env <value> Sets process.env.NODE_ENV to the specified value.
--progress [value] Print compilation progress during build.
--no-progress Negative 'progress' option.
-j, --json [value] Prints result as JSON or store it in a file.
--no-json Negative 'json' option.
--entry <value...> The entry point(s) of your application e.g.
./src/main.js.
-o, --output-path <value> Output location of the file generated by webpack
Expand Down Expand Up @@ -546,13 +528,10 @@ Options:
-c, --config <value...> Provide path to a webpack configuration file e.g. ./webpack.config.js.
--config-name <value...> Name of the configuration to use.
-m, --merge Merge two or more configurations using 'webpack-merge'.
--no-merge Negative 'merge' option.
--env <value...> Environment passed to the configuration when it is a function.
--node-env <value> Sets process.env.NODE_ENV to the specified value.
--progress [value] Print compilation progress during build.
--no-progress Negative 'progress' option.
-j, --json [value] Prints result as JSON or store it in a file.
--no-json Negative 'json' option.
--entry <value...> The entry point(s) of your application e.g. ./src/main.js.
-o, --output-path <value> Output location of the file generated by webpack e.g. ./dist/.
-t, --target <value> Sets the build target e.g. node.
Expand Down Expand Up @@ -602,13 +581,10 @@ Options:
-c, --config <value...> Provide path to a webpack configuration file e.g. ./webpack.config.js.
--config-name <value...> Name of the configuration to use.
-m, --merge Merge two or more configurations using 'webpack-merge'.
--no-merge Negative 'merge' option.
--env <value...> Environment passed to the configuration when it is a function.
--node-env <value> Sets process.env.NODE_ENV to the specified value.
--progress [value] Print compilation progress during build.
--no-progress Negative 'progress' option.
-j, --json [value] Prints result as JSON or store it in a file.
--no-json Negative 'json' option.
--entry <value...> The entry point(s) of your application e.g. ./src/main.js.
-o, --output-path <value> Output location of the file generated by webpack e.g. ./dist/.
-t, --target <value> Sets the build target e.g. node.
Expand Down
24 changes: 0 additions & 24 deletions test/help/__snapshots__/help.test.js.snap.webpack5
Expand Up @@ -69,13 +69,10 @@ Options:
-c, --config <value...> Provide path to a webpack configuration file e.g. ./webpack.config.js.
--config-name <value...> Name of the configuration to use.
-m, --merge Merge two or more configurations using 'webpack-merge'.
--no-merge Negative 'merge' option.
--env <value...> Environment passed to the configuration when it is a function.
--node-env <value> Sets process.env.NODE_ENV to the specified value.
--progress [value] Print compilation progress during build.
--no-progress Negative 'progress' option.
-j, --json [value] Prints result as JSON or store it in a file.
--no-json Negative 'json' option.
-d, --devtool <value> Determine source maps to use.
--no-devtool Do not generate source maps.
--entry <value...> The entry point(s) of your application e.g. ./src/main.js.
Expand Down Expand Up @@ -127,13 +124,10 @@ Options:
-c, --config <value...> Provide path to a webpack configuration file e.g. ./webpack.config.js.
--config-name <value...> Name of the configuration to use.
-m, --merge Merge two or more configurations using 'webpack-merge'.
--no-merge Negative 'merge' option.
--env <value...> Environment passed to the configuration when it is a function.
--node-env <value> Sets process.env.NODE_ENV to the specified value.
--progress [value] Print compilation progress during build.
--no-progress Negative 'progress' option.
-j, --json [value] Prints result as JSON or store it in a file.
--no-json Negative 'json' option.
-d, --devtool <value> Determine source maps to use.
--no-devtool Do not generate source maps.
--entry <value...> The entry point(s) of your application e.g. ./src/main.js.
Expand Down Expand Up @@ -185,13 +179,10 @@ Options:
-c, --config <value...> Provide path to a webpack configuration file e.g. ./webpack.config.js.
--config-name <value...> Name of the configuration to use.
-m, --merge Merge two or more configurations using 'webpack-merge'.
--no-merge Negative 'merge' option.
--env <value...> Environment passed to the configuration when it is a function.
--node-env <value> Sets process.env.NODE_ENV to the specified value.
--progress [value] Print compilation progress during build.
--no-progress Negative 'progress' option.
-j, --json [value] Prints result as JSON or store it in a file.
--no-json Negative 'json' option.
-d, --devtool <value> Determine source maps to use.
--no-devtool Do not generate source maps.
--entry <value...> The entry point(s) of your application e.g. ./src/main.js.
Expand Down Expand Up @@ -244,14 +235,11 @@ Options:
--config-name <value...> Name of the configuration to use.
-m, --merge Merge two or more configurations using
'webpack-merge'.
--no-merge Negative 'merge' option.
--env <value...> Environment passed to the configuration when it is
a function.
--node-env <value> Sets process.env.NODE_ENV to the specified value.
--progress [value] Print compilation progress during build.
--no-progress Negative 'progress' option.
-j, --json [value] Prints result as JSON or store it in a file.
--no-json Negative 'json' option.
-d, --devtool <value> Determine source maps to use.
--no-devtool Do not generate source maps.
--entry <value...> The entry point(s) of your application e.g.
Expand Down Expand Up @@ -421,14 +409,11 @@ Options:
--config-name <value...> Name of the configuration to use.
-m, --merge Merge two or more configurations using
'webpack-merge'.
--no-merge Negative 'merge' option.
--env <value...> Environment passed to the configuration when it
is a function.
--node-env <value> Sets process.env.NODE_ENV to the specified value.
--progress [value] Print compilation progress during build.
--no-progress Negative 'progress' option.
-j, --json [value] Prints result as JSON or store it in a file.
--no-json Negative 'json' option.
-d, --devtool <value> Determine source maps to use.
--no-devtool Do not generate source maps.
--entry <value...> The entry point(s) of your application e.g.
Expand Down Expand Up @@ -508,14 +493,11 @@ Options:
--config-name <value...> Name of the configuration to use.
-m, --merge Merge two or more configurations using
'webpack-merge'.
--no-merge Negative 'merge' option.
--env <value...> Environment passed to the configuration when it is
a function.
--node-env <value> Sets process.env.NODE_ENV to the specified value.
--progress [value] Print compilation progress during build.
--no-progress Negative 'progress' option.
-j, --json [value] Prints result as JSON or store it in a file.
--no-json Negative 'json' option.
-d, --devtool <value> Determine source maps to use.
--no-devtool Do not generate source maps.
--entry <value...> The entry point(s) of your application e.g.
Expand Down Expand Up @@ -558,13 +540,10 @@ Options:
-c, --config <value...> Provide path to a webpack configuration file e.g. ./webpack.config.js.
--config-name <value...> Name of the configuration to use.
-m, --merge Merge two or more configurations using 'webpack-merge'.
--no-merge Negative 'merge' option.
--env <value...> Environment passed to the configuration when it is a function.
--node-env <value> Sets process.env.NODE_ENV to the specified value.
--progress [value] Print compilation progress during build.
--no-progress Negative 'progress' option.
-j, --json [value] Prints result as JSON or store it in a file.
--no-json Negative 'json' option.
-d, --devtool <value> Determine source maps to use.
--no-devtool Do not generate source maps.
--entry <value...> The entry point(s) of your application e.g. ./src/main.js.
Expand Down Expand Up @@ -616,13 +595,10 @@ Options:
-c, --config <value...> Provide path to a webpack configuration file e.g. ./webpack.config.js.
--config-name <value...> Name of the configuration to use.
-m, --merge Merge two or more configurations using 'webpack-merge'.
--no-merge Negative 'merge' option.
--env <value...> Environment passed to the configuration when it is a function.
--node-env <value> Sets process.env.NODE_ENV to the specified value.
--progress [value] Print compilation progress during build.
--no-progress Negative 'progress' option.
-j, --json [value] Prints result as JSON or store it in a file.
--no-json Negative 'json' option.
-d, --devtool <value> Determine source maps to use.
--no-devtool Do not generate source maps.
--entry <value...> The entry point(s) of your application e.g. ./src/main.js.
Expand Down