mirror of
https://github.com/Redocly/redoc.git
synced 2025-01-31 10:04:08 +03:00
chore: various CLI fixes
This commit is contained in:
parent
5dc21af281
commit
e5458c0564
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -25,6 +25,7 @@ stats.json
|
||||||
e2e/.build/
|
e2e/.build/
|
||||||
cypress/
|
cypress/
|
||||||
bundles
|
bundles
|
||||||
|
bin/cli.js
|
||||||
|
|
||||||
/benchmark/revisions
|
/benchmark/revisions
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
!bundles/
|
!bundles/
|
||||||
!package.json
|
!package.json
|
||||||
!README.md
|
!README.md
|
||||||
!bin/
|
!bin/cli.js
|
|
@ -45,6 +45,9 @@ yargs
|
||||||
alias: 'watch',
|
alias: 'watch',
|
||||||
type: 'boolean',
|
type: 'boolean',
|
||||||
});
|
});
|
||||||
|
|
||||||
|
yargs.demandOption('spec');
|
||||||
|
return yargs;
|
||||||
},
|
},
|
||||||
async argv => {
|
async argv => {
|
||||||
try {
|
try {
|
||||||
|
@ -74,6 +77,9 @@ yargs
|
||||||
type: 'boolean',
|
type: 'boolean',
|
||||||
default: false,
|
default: false,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
yargs.demandOption('spec');
|
||||||
|
return yargs;
|
||||||
},
|
},
|
||||||
async argv => {
|
async argv => {
|
||||||
try {
|
try {
|
||||||
|
@ -82,7 +88,8 @@ yargs
|
||||||
console.log(e.message);
|
console.log(e.message);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
).argv;
|
)
|
||||||
|
.demandCommand().argv;
|
||||||
|
|
||||||
async function serve(port: number, pathToSpec: string, options: Options = {}) {
|
async function serve(port: number, pathToSpec: string, options: Options = {}) {
|
||||||
let spec = await loadAndBundleSpec(pathToSpec);
|
let spec = await loadAndBundleSpec(pathToSpec);
|
||||||
|
|
|
@ -21,7 +21,8 @@
|
||||||
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 1",
|
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 1",
|
||||||
"lint": "tslint --project tsconfig.json",
|
"lint": "tslint --project tsconfig.json",
|
||||||
"benchmark": "node ./benchmark/benchmark.js",
|
"benchmark": "node ./benchmark/benchmark.js",
|
||||||
"start:demo": "webpack-dev-server --config demo/webpack.config.ts"
|
"start:demo": "webpack-dev-server --config demo/webpack.config.ts",
|
||||||
|
"compile:cli": "tsc bin/cli.ts --target es6 --module commonjs --types yargs"
|
||||||
},
|
},
|
||||||
"author": "",
|
"author": "",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
@ -42,6 +43,7 @@
|
||||||
"@types/react-tabs": "^1.0.2",
|
"@types/react-tabs": "^1.0.2",
|
||||||
"@types/webpack": "^3.0.5",
|
"@types/webpack": "^3.0.5",
|
||||||
"@types/webpack-env": "^1.13.0",
|
"@types/webpack-env": "^1.13.0",
|
||||||
|
"@types/yargs": "^11.0.0",
|
||||||
"awesome-typescript-loader": "^3.2.2",
|
"awesome-typescript-loader": "^3.2.2",
|
||||||
"beautify-benchmark": "^0.2.4",
|
"beautify-benchmark": "^0.2.4",
|
||||||
"conventional-changelog-cli": "^1.3.5",
|
"conventional-changelog-cli": "^1.3.5",
|
||||||
|
|
|
@ -211,6 +211,10 @@
|
||||||
"@types/uglify-js" "*"
|
"@types/uglify-js" "*"
|
||||||
source-map "^0.6.0"
|
source-map "^0.6.0"
|
||||||
|
|
||||||
|
"@types/yargs@^11.0.0":
|
||||||
|
version "11.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-11.0.0.tgz#124b9ed9c65b7091cc36da59ae12cbd47d8745ea"
|
||||||
|
|
||||||
JSONStream@^1.0.4:
|
JSONStream@^1.0.4:
|
||||||
version "1.3.2"
|
version "1.3.2"
|
||||||
resolved "https://registry.yarnpkg.com/JSONStream/-/JSONStream-1.3.2.tgz#c102371b6ec3a7cf3b847ca00c20bb0fce4c6dea"
|
resolved "https://registry.yarnpkg.com/JSONStream/-/JSONStream-1.3.2.tgz#c102371b6ec3a7cf3b847ca00c20bb0fce4c6dea"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user