aboutsummaryrefslogtreecommitdiffstats
path: root/packages/monorepo-scripts/src/doc_generate_and_upload.ts
blob: ab1f97ad89e04aacdb0cf8445f44111a3713349f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import * as yargs from 'yargs';

import { generateAndUploadDocsAsync } from './utils/publish_utils';

const args = yargs
    .option('package', {
        describe: 'Monorepo sub-package for which to generate DocJSON',
        type: 'string',
        demandOption: true,
    })
    .option('isStaging', {
        describe: 'Whether we wish to publish docs to staging or production',
        type: 'boolean',
        demandOption: true,
    })
    .example("$0 --package '0x.js' --isStaging true", 'Full usage example').argv;

(async () => {
    const packageName = args.package;
    const isStaging = args.isStaging;

    await generateAndUploadDocsAsync(packageName, isStaging);
})();