diff options
author | Fabio Berger <me@fabioberger.com> | 2018-08-22 06:06:21 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2018-08-22 06:06:21 +0800 |
commit | fe43f84abdeb2ed6805d3879f531fbc4f46c4fec (patch) | |
tree | 8b33e9838b9e93e48ba93de363b24631ee5291c3 /packages/monorepo-scripts/src/doc_generate_and_upload.ts | |
parent | 6b838c034a3a489ae0b962af820270eafc52c377 (diff) | |
download | dexon-0x-contracts-fe43f84abdeb2ed6805d3879f531fbc4f46c4fec.tar dexon-0x-contracts-fe43f84abdeb2ed6805d3879f531fbc4f46c4fec.tar.gz dexon-0x-contracts-fe43f84abdeb2ed6805d3879f531fbc4f46c4fec.tar.bz2 dexon-0x-contracts-fe43f84abdeb2ed6805d3879f531fbc4f46c4fec.tar.lz dexon-0x-contracts-fe43f84abdeb2ed6805d3879f531fbc4f46c4fec.tar.xz dexon-0x-contracts-fe43f84abdeb2ed6805d3879f531fbc4f46c4fec.tar.zst dexon-0x-contracts-fe43f84abdeb2ed6805d3879f531fbc4f46c4fec.zip |
Use bash for loop for generating docs for each package, revert changes to script
Diffstat (limited to 'packages/monorepo-scripts/src/doc_generate_and_upload.ts')
-rw-r--r-- | packages/monorepo-scripts/src/doc_generate_and_upload.ts | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/packages/monorepo-scripts/src/doc_generate_and_upload.ts b/packages/monorepo-scripts/src/doc_generate_and_upload.ts index 7b6f2d9f0..2a53628b5 100644 --- a/packages/monorepo-scripts/src/doc_generate_and_upload.ts +++ b/packages/monorepo-scripts/src/doc_generate_and_upload.ts @@ -5,9 +5,9 @@ import { DocGenerateAndUploadUtils } from './utils/doc_generate_and_upload_utils const args = yargs .option('package', { describe: - 'Monorepo sub-package for which to generate DocJSON. If not supplied, it will do all defined in docGenConfigs.', + 'Monorepo sub-package for which to generate DocJSON', type: 'string', - demandOption: false, + demandOption: true, }) .option('isStaging', { describe: 'Whether we wish to publish docs to staging or production', @@ -23,10 +23,15 @@ const args = yargs .example("$0 --package '0x.js' --isStaging true", 'Full usage example').argv; (async () => { - const packageNameIfExists = args.package; + const packageName = args.package; const isStaging = args.isStaging; const shouldUploadDocs = args.shouldUpload; - const docGenerateAndUploadUtils = new DocGenerateAndUploadUtils(packageNameIfExists, isStaging, shouldUploadDocs); + const docGenerateAndUploadUtils = new DocGenerateAndUploadUtils(packageName, isStaging, shouldUploadDocs); await docGenerateAndUploadUtils.generateAndUploadDocsAsync(); -})(); + + process.exit(0); +})().catch(err => { + console.log(err); + process.exit(1); +}); |