aboutsummaryrefslogtreecommitdiffstats
path: root/packages/monorepo-scripts/src
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-08-21 18:17:12 +0800
committerFabio Berger <me@fabioberger.com>2018-08-21 18:17:12 +0800
commit635373febb6e6d24a08549b2eb0db29a3d7619e6 (patch)
treee7d23080f8234c4cc5ddb702885abdc7336516ac /packages/monorepo-scripts/src
parente7c7af8ef4ffb5dc3f1cbe468d272f4b9424fdc7 (diff)
downloaddexon-sol-tools-635373febb6e6d24a08549b2eb0db29a3d7619e6.tar
dexon-sol-tools-635373febb6e6d24a08549b2eb0db29a3d7619e6.tar.gz
dexon-sol-tools-635373febb6e6d24a08549b2eb0db29a3d7619e6.tar.bz2
dexon-sol-tools-635373febb6e6d24a08549b2eb0db29a3d7619e6.tar.lz
dexon-sol-tools-635373febb6e6d24a08549b2eb0db29a3d7619e6.tar.xz
dexon-sol-tools-635373febb6e6d24a08549b2eb0db29a3d7619e6.tar.zst
dexon-sol-tools-635373febb6e6d24a08549b2eb0db29a3d7619e6.zip
Implement ignoring config types
Diffstat (limited to 'packages/monorepo-scripts/src')
-rw-r--r--packages/monorepo-scripts/src/types.ts1
-rw-r--r--packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts8
2 files changed, 7 insertions, 2 deletions
diff --git a/packages/monorepo-scripts/src/types.ts b/packages/monorepo-scripts/src/types.ts
index 5f6a6c707..9b6846f02 100644
--- a/packages/monorepo-scripts/src/types.ts
+++ b/packages/monorepo-scripts/src/types.ts
@@ -55,6 +55,7 @@ export interface DocGenConfigs {
EXTERNAL_TYPE_TO_LINK: { [externalType: string]: string };
EXTERNAL_EXPORT_TO_LINK: { [externalExport: string]: string };
CLASSES_WITH_HIDDEN_CONSTRUCTORS: string[];
+ IGNORED_EXCESSIVE_TYPES: string[];
}
export interface ExportPathToExportedItems {
diff --git a/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts b/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts
index c321aa823..e9586e68b 100644
--- a/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts
+++ b/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts
@@ -308,9 +308,13 @@ export class DocGenerateAndUploadUtils {
private _lookForUnusedExportedTypesThrowIfExists(referenceNames: string[], typedocOutput: any): void {
const exportedTypes = DocGenerateAndUploadUtils._getAllTypeNames(typedocOutput, []);
const excessiveReferences = _.difference(exportedTypes, referenceNames);
- if (!_.isEmpty(excessiveReferences)) {
+ const excessiveReferencesExceptIgnored = _.difference(
+ excessiveReferences,
+ docGenConfigs.IGNORED_EXCESSIVE_TYPES,
+ );
+ if (!_.isEmpty(excessiveReferencesExceptIgnored)) {
throw new Error(
- `${this._packageName} package exports BUT does not need: \n${excessiveReferences.join(
+ `${this._packageName} package exports BUT does not need: \n${excessiveReferencesExceptIgnored.join(
'\n',
)} \nin it\'s index.ts. Remove them then try again.`,
);