diff --git a/README.md b/README.md index 06c4132e2e..1d35a3f8bc 100644 --- a/README.md +++ b/README.md @@ -95,9 +95,11 @@ Options: --client-progress Print compilation progress in percentage in the browser. --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. - --open [value] Open the default browser, or optionally specify a browser name. - --open-app Open specified browser. - --open-target Open specified route in browser. + --open [value...] Open the default browser. + --no-open Do not open the default browser. + --open-app Open specified browser. + --open-target [value...] Open specified route in browser. + --no-open-target Do not open specified route in browser. --client-logging Log level in the browser (none, error, warn, info, log, verbose). --history-api-fallback Fallback to /index.html for Single Page Applications. --no-history-api-fallback Do not fallback to /index.html for Single Page Applications. @@ -106,6 +108,7 @@ Options: --public The public hostname/ip address of the server. --firewall [value...] Enable firewall or set hosts that are allowed to access the dev server. --no-firewall Disable firewall. + --watch-files Watch static files for file changes. Global options: --color Enable colors on console. diff --git a/bin/cli-flags.js b/bin/cli-flags.js index fea7b03177..8d033720e4 100644 --- a/bin/cli-flags.js +++ b/bin/cli-flags.js @@ -125,6 +125,7 @@ module.exports = { }, ], description: 'Open the default browser.', + negatedDescription: 'Do not open the default browser.', }, { name: 'open-app', @@ -158,6 +159,7 @@ module.exports = { opts.open.target = opts.openTarget; delete opts.openTarget; }, + negatedDescription: 'Do not open specified route in browser.', multiple: true, }, { @@ -236,7 +238,7 @@ module.exports = { type: 'string', }, ], - description: 'Watch static files for file changes', + description: 'Watch static files for file changes.', multiple: true, }, ], diff --git a/test/cli/cli.test.js b/test/cli/cli.test.js index 3cafd9eecb..43795e46a8 100644 --- a/test/cli/cli.test.js +++ b/test/cli/cli.test.js @@ -246,6 +246,15 @@ describe('CLI', () => { .catch(done); }); + it('--no-open', (done) => { + testBin('--no-open') + .then((output) => { + expect(output.exitCode).toEqual(0); + done(); + }) + .catch(done); + }); + it('--open-app google-chrome', (done) => { testBin('--open-app google-chrome') .then((output) => { @@ -264,6 +273,15 @@ describe('CLI', () => { .catch(done); }); + it('--no-open-target', (done) => { + testBin('--no-open-target') + .then((output) => { + expect(output.exitCode).toEqual(0); + done(); + }) + .catch(done); + }); + it('--open-target index.html', (done) => { testBin('--open-target index.html') .then((output) => {