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: improve descriptions for negative flags #3029

Merged
merged 1 commit into from
Feb 19, 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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 21 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ node_modules/.bin/webpack serve
Following options are available with `webpack serve`:

```
Usage: webpack serve|s [entries...] [options]

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.
Expand All @@ -79,28 +81,28 @@ Options:
-t, --target <value...> Sets the build target e.g. node.
--watch-options-stdin Stop watching when stdin stream has ended.
--no-watch-options-stdin Do not stop watching when stdin stream has ended.
--host <value> The hostname/ip address the server will bind to
--port <value> The port
--host <value> The hostname/ip address the server will bind to.
--port <value> The port server will listen to.
--static [value...] A directory to serve static content from.
--no-static Negative 'static' option.
--live-reload Enables/Disables live reloading on changing files
--no-live-reload Negative 'live-reload' option.
--https HTTPS
--http2 HTTP/2, must be used with HTTPS
--bonjour Broadcasts the server via ZeroConf networking on start
--client-progress Print compilation progress in percentage in the browser
--hot-only Do not refresh page if HMR fails
--setup-exit-signals Close and exit the process on SIGINT and SIGTERM
--no-setup-exit-signals Negative 'setup-exit-signals' option.
--stdin Close when stdin ends
--open [value] Open the default browser, or optionally specify a browser name
--use-local-ip Open default browser with local IP
--open-page <value...> Open default browser with the specified page
--client-logging <value> Log level in the browser (none, error, warn, info, log, verbose)
--live-reload Enables live reloading on changing files.
--no-live-reload Disables live reloading on changing files.
--https Use HTTPS protocol.
--http2 Use HTTP/2, must be used with HTTPS.
--bonjour Broadcasts the server via ZeroConf networking on start.
--client-progress Print compilation progress in percentage in the browser.
--hot-only Do not refresh page if HMR fails.
--setup-exit-signals Close and exit the process on SIGINT and SIGTERM.
--no-setup-exit-signals Do not close and exit the process on SIGNIT and SIGTERM.
--stdin Close when stdin ends.
--open [value] Open the default browser, or optionally specify a browser name.
--use-local-ip Open default browser with local IP.
--open-page <value...> Open default browser with the specified page.
--client-logging <value> Log level in the browser (none, error, warn, info, log, verbose).
--history-api-fallback Fallback to /index.html for Single Page Applications.
--compress Enable gzip compression
--public <value> The public hostname/ip address of the server
--firewall <value...> Enable/disable firewall, or set hosts that are allowed to access the dev server
--compress Enable gzip compression.
--public <value> The public hostname/ip address of the server.
--firewall <value...> Enable/disable firewall, or set hosts that are allowed to access the dev server.

Global options:
--color Enable colors on console.
Expand Down
3 changes: 3 additions & 0 deletions bin/cli-flags.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ module.exports = {
name: 'live-reload',
type: Boolean,
description: 'Enables live reloading on changing files.',
negatedDescription: 'Disables live reloading on changing files.',
negative: true,
},
{
Expand Down Expand Up @@ -63,6 +64,8 @@ module.exports = {
name: 'setup-exit-signals',
type: Boolean,
description: 'Close and exit the process on SIGINT and SIGTERM.',
negatedDescription:
'Do not close and exit the process on SIGNIT and SIGTERM.',
negative: true,
},
{
Expand Down