From 3bfcdfe28a7e8a1bc9c5559ad6d6457a6896ccbb Mon Sep 17 00:00:00 2001 From: egavr Date: Fri, 8 Sep 2017 21:24:26 +0300 Subject: [PATCH] docs: actualize --- README.md | 28 ++++++++++++---------------- lib/cli.js | 15 +++++++-------- 2 files changed, 19 insertions(+), 24 deletions(-) diff --git a/README.md b/README.md index cbeab1e..3f32650 100644 --- a/README.md +++ b/README.md @@ -29,19 +29,15 @@ Web browser with `GUI` loaded will be opened automatically. ## Options -* `--config`, `-c` - specify config file to use. -* `--port`, `-p` - specify port to run `GUI` backend on. -* `--hostname`, `-h` - specify hostname to run `GUI` backend on. -* `--root-url`, `-r` - use specified URL, instead of `rootUrl` setting from config file. -* `--grid-url` - use specified URL, instead of `gridUrl` setting from config file. -* `--screenshots-dir`, `-s` - use specified directory, instead of `screenshotsDir` setting -from config. -* `--grep`, `-g` - find suites by name. Note that if some suite files specified search will be done -only in that files. -* `--debug` - enable debug mode (verbose logging). -* `--auto-run`, `-a` - run gemini immediately (without pressing `run` button). -* `--set`, `-s` - run set specified in config. -* `--no-open`, `-O` - not to open a browser window after starting the server. - -You can also override config file options with environment variables. Use `gemini` -[documentation](https://github.com/gemini-testing/gemini#configuration) for details. +* `-V`, `--version` – output the version number +* `-b`, `--browser ` – run test only in the specified browser +* `-p`, `--port ` – port to launch server on +* `-h`, `--hostname ` – hostname to launch server on +* `-c, --config ` – gemini config file +* `-g, --grep ` – run only suites matching the pattern +* `-s`, `--set ` – set to run +* `-a`, `--auto-run` – auto run immediately +* `-O`, `--no-open` – not to open a browser window after starting the server +* `-h`, `--help` – output usage information + +Also you can override gemini config options via environment variables and CLI options. See gemini [documentation](https://github.com/gemini-testing/gemini#configuration) for details. diff --git a/lib/cli.js b/lib/cli.js index b7d7875..b3e8203 100644 --- a/lib/cli.js +++ b/lib/cli.js @@ -14,20 +14,19 @@ exports.run = () => { .version(pkg.version) .allowUnknownOption(true) .option('-b, --browser ', 'run test only in the specified browser', collect) - .option('-p, --port ', 'Port to launch server on', 8000) - .option('-h, --hostname ', 'Hostname to launch server on', 'localhost') - .option('-c, --config ', 'Gemini config file', path.resolve, '') + .option('-p, --port ', 'port to launch server on', 8000) + .option('-h, --hostname ', 'hostname to launch server on', 'localhost') + .option('-c, --config ', 'gemini config file', path.resolve, '') .option('-g, --grep ', 'run only suites matching the pattern', RegExp) .option('-s, --set ', 'set to run', collect) .option('-a, --auto-run', 'auto run immediately') .option('-O, --no-open', 'not to open a browser window after starting the server') + .on('--help', () => { + console.log('\n Also you can override gemini config options via environment variables and CLI options.' + + ' See gemini documentation for details.'); + }) .parse(process.argv); - program.on('--help', () => { - console.log('Also you can override gemini config options.'); - console.log('See all possible options in gemini documentation.'); - }); - program.testFiles = [].concat(program.args); server.start(program).then((result) => { console.log(`GUI is running at ${chalk.cyan(result.url)}`);