aboutsummaryrefslogtreecommitdiffstats
path: root/packages/monorepo-scripts/src/publish.ts
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-08-18 03:53:27 +0800
committerFabio Berger <me@fabioberger.com>2018-08-18 03:53:27 +0800
commit05ce0024352f2198a3744d62d9532a7e729ef5fa (patch)
tree3c2d0ad33eea0b728eb2421883c106df646f4fe3 /packages/monorepo-scripts/src/publish.ts
parent68d7eb5712750fae2bdc680c45bc5927e1837afe (diff)
downloaddexon-0x-contracts-05ce0024352f2198a3744d62d9532a7e729ef5fa.tar.gz
dexon-0x-contracts-05ce0024352f2198a3744d62d9532a7e729ef5fa.tar.zst
dexon-0x-contracts-05ce0024352f2198a3744d62d9532a7e729ef5fa.zip
Refactor DocGenerateAndUploadUtils to be a class, and decompose large methods for readability
Diffstat (limited to 'packages/monorepo-scripts/src/publish.ts')
-rw-r--r--packages/monorepo-scripts/src/publish.ts9
1 files changed, 5 insertions, 4 deletions
diff --git a/packages/monorepo-scripts/src/publish.ts b/packages/monorepo-scripts/src/publish.ts
index bb2dd60c1..6691fd3c1 100644
--- a/packages/monorepo-scripts/src/publish.ts
+++ b/packages/monorepo-scripts/src/publish.ts
@@ -13,9 +13,9 @@ import { constants } from './constants';
import { Package, PackageToNextVersion, VersionChangelog } from './types';
import { changelogUtils } from './utils/changelog_utils';
import { configs } from './utils/configs';
-import { utils } from './utils/utils';
+import { DocGenerateAndUploadUtils } from './utils/doc_generate_and_upload_utils';
import { publishReleaseNotesAsync } from './utils/github_release_utils';
-import { generateAndUploadDocsAsync } from './utils/doc_generate_and_upload_utils';
+import { utils } from './utils/utils';
const DOC_GEN_COMMAND = 'docs:json';
const NPM_NAMESPACE = '@0xproject/';
@@ -81,11 +81,12 @@ async function confirmAsync(message: string): Promise<void> {
process.exit(1);
});
-async function generateAndUploadDocJsonsAsync(updatedPublicPackages: Package[], isStaging: boolean) {
+async function generateAndUploadDocJsonsAsync(updatedPublicPackages: Package[], isStaging: boolean): Promise<void> {
for (const pkg of updatedPublicPackages) {
const packageName = pkg.packageJson.name;
const nameWithoutPrefix = packageName.replace('@0xproject/', '');
- await generateAndUploadDocsAsync(nameWithoutPrefix, isStaging);
+ const docGenerateAndUploadUtils = new DocGenerateAndUploadUtils(nameWithoutPrefix, isStaging);
+ await docGenerateAndUploadUtils.generateAndUploadDocsAsync();
}
}