From 8891f5c97daaa7b5aa3b3e80a725fc3ef4123b3c Mon Sep 17 00:00:00 2001 From: Roman Hotsiy Date: Tue, 20 Mar 2018 12:49:25 +0200 Subject: [PATCH] fix(cli): fix crash --- cli/index.ts | 4 ++-- cli/package.json | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/cli/index.ts b/cli/index.ts index 7a090feeae..483fbd6ce6 100644 --- a/cli/index.ts +++ b/cli/index.ts @@ -113,6 +113,7 @@ yargs } }, ) + .demandCommand() .options('t', { alias: 'template', describe: 'Path to handlebars page template, see https://git.io/vxZ3V for the example ', @@ -120,8 +121,7 @@ yargs }) .options('options', { describe: 'ReDoc options, use dot notation, e.g. options.nativeScrollbars', - }) - .demandCommand().argv; + }).argv; async function serve(port: number, pathToSpec: string, options: Options = {}) { let spec = await loadAndBundleSpec(pathToSpec); diff --git a/cli/package.json b/cli/package.json index 076bd4b630..47a341ed17 100644 --- a/cli/package.json +++ b/cli/package.json @@ -1,6 +1,6 @@ { "name": "redoc-cli", - "version": "0.3.1", + "version": "0.3.3", "description": "ReDoc's Command Line Interface", "main": "index.js", "bin": "index.js", @@ -12,7 +12,8 @@ "isarray": "^2.0.4", "react": "^16.3.0-alpha.2", "react-dom": "^16.3.0-alpha.2", - "redoc": "^2.0.0-alpha.15" + "redoc": "^2.0.0-alpha.15", + "yargs": "^11.0.0" }, "scripts": { "ci-publish": "ci-publish"