aboutsummaryrefslogtreecommitdiffstats
path: root/packages/monorepo-scripts/src
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-07-30 05:34:49 +0800
committerFabio Berger <me@fabioberger.com>2018-07-30 05:34:49 +0800
commitb7ff1fe5d352b4f59664198d9fe852cbe1015357 (patch)
tree67a3ba194db32092cba2a4a4c1a8cc2d0ea8ed41 /packages/monorepo-scripts/src
parent1b24064c9f62b0b5638a5dab1878278e8e01649e (diff)
downloaddexon-sol-tools-b7ff1fe5d352b4f59664198d9fe852cbe1015357.tar
dexon-sol-tools-b7ff1fe5d352b4f59664198d9fe852cbe1015357.tar.gz
dexon-sol-tools-b7ff1fe5d352b4f59664198d9fe852cbe1015357.tar.bz2
dexon-sol-tools-b7ff1fe5d352b4f59664198d9fe852cbe1015357.tar.lz
dexon-sol-tools-b7ff1fe5d352b4f59664198d9fe852cbe1015357.tar.xz
dexon-sol-tools-b7ff1fe5d352b4f59664198d9fe852cbe1015357.tar.zst
dexon-sol-tools-b7ff1fe5d352b4f59664198d9fe852cbe1015357.zip
Move type
Diffstat (limited to 'packages/monorepo-scripts/src')
-rw-r--r--packages/monorepo-scripts/src/doc_generate_and_upload.ts9
-rw-r--r--packages/monorepo-scripts/src/types.ts4
2 files changed, 9 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 592c36ae2..03910c460 100644
--- a/packages/monorepo-scripts/src/doc_generate_and_upload.ts
+++ b/packages/monorepo-scripts/src/doc_generate_and_upload.ts
@@ -6,12 +6,9 @@ import * as ts from 'typescript';
import * as yargs from 'yargs';
import { constants } from './constants';
+import { ExportPathToExportedItems } from './types';
import { utils } from './utils/utils';
-export interface ExportPathToExportedItems {
- [pkgName: string]: string[];
-}
-
const args = yargs
.option('package', {
describe: 'Monorepo sub-package for which to generate DocJSON',
@@ -26,8 +23,12 @@ const args = yargs
.example("$0 --package '0x.js' --isStaging true", 'Full usage example').argv;
(async () => {
+ console.log('I RAN! - generateAndUploadDocsAsync');
const packageName = args.package;
const isStaging = args.isStaging;
+ if (_.isEmpty(packageName)) {
+ return; // We are not runninng in a command-line env.
+ }
await generateAndUploadDocsAsync(packageName, isStaging);
})();
diff --git a/packages/monorepo-scripts/src/types.ts b/packages/monorepo-scripts/src/types.ts
index d9e1dfabb..4d4600abf 100644
--- a/packages/monorepo-scripts/src/types.ts
+++ b/packages/monorepo-scripts/src/types.ts
@@ -49,3 +49,7 @@ export interface Package {
location: string;
packageJson: PackageJSON;
}
+
+export interface ExportPathToExportedItems {
+ [pkgName: string]: string[];
+}