diff options
author | Fabio Berger <me@fabioberger.com> | 2018-08-22 02:07:20 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2018-08-22 02:07:20 +0800 |
commit | 6b838c034a3a489ae0b962af820270eafc52c377 (patch) | |
tree | b972b83d2f3618edf319795accb143c6dc4ccb2b /packages/monorepo-scripts/src/doc_generate_and_upload.ts | |
parent | 8bb7b5b543c4d914067b6bbb269be9cc2ac7f647 (diff) | |
download | dexon-0x-contracts-6b838c034a3a489ae0b962af820270eafc52c377.tar dexon-0x-contracts-6b838c034a3a489ae0b962af820270eafc52c377.tar.gz dexon-0x-contracts-6b838c034a3a489ae0b962af820270eafc52c377.tar.bz2 dexon-0x-contracts-6b838c034a3a489ae0b962af820270eafc52c377.tar.lz dexon-0x-contracts-6b838c034a3a489ae0b962af820270eafc52c377.tar.xz dexon-0x-contracts-6b838c034a3a489ae0b962af820270eafc52c377.tar.zst dexon-0x-contracts-6b838c034a3a489ae0b962af820270eafc52c377.zip |
Modify script so it can generate docs for a specific package or all packages with doc pages, add doc gen test to CircleCi runs
Diffstat (limited to 'packages/monorepo-scripts/src/doc_generate_and_upload.ts')
-rw-r--r-- | packages/monorepo-scripts/src/doc_generate_and_upload.ts | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/packages/monorepo-scripts/src/doc_generate_and_upload.ts b/packages/monorepo-scripts/src/doc_generate_and_upload.ts index 77dc2f323..7b6f2d9f0 100644 --- a/packages/monorepo-scripts/src/doc_generate_and_upload.ts +++ b/packages/monorepo-scripts/src/doc_generate_and_upload.ts @@ -4,9 +4,10 @@ import { DocGenerateAndUploadUtils } from './utils/doc_generate_and_upload_utils const args = yargs .option('package', { - describe: 'Monorepo sub-package for which to generate DocJSON', + describe: + 'Monorepo sub-package for which to generate DocJSON. If not supplied, it will do all defined in docGenConfigs.', type: 'string', - demandOption: true, + demandOption: false, }) .option('isStaging', { describe: 'Whether we wish to publish docs to staging or production', @@ -22,10 +23,10 @@ const args = yargs .example("$0 --package '0x.js' --isStaging true", 'Full usage example').argv; (async () => { - const packageName = args.package; + const packageNameIfExists = args.package; const isStaging = args.isStaging; const shouldUploadDocs = args.shouldUpload; - const docGenerateAndUploadUtils = new DocGenerateAndUploadUtils(packageName, isStaging, shouldUploadDocs); + const docGenerateAndUploadUtils = new DocGenerateAndUploadUtils(packageNameIfExists, isStaging, shouldUploadDocs); await docGenerateAndUploadUtils.generateAndUploadDocsAsync(); })(); |