scripts/api-extractor: some more explanations

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2021-04-22 18:24:41 +02:00
parent 658de01647
commit 70ac6d68c2
+8 -1
View File
@@ -35,7 +35,13 @@ import { MarkdownDocumenter } from '@microsoft/api-documenter/lib/documenters/Ma
const tmpDir = resolvePath(__dirname, '../node_modules/.cache/api-extractor');
/**
* Yup
* All of this monkey patching below is because MUI has these bare package.json file as a method
* for making TypeScript accept imports like `@material-ui/core/Button`, and improve tree-shaking
* by declaring them side effect free.
*
* The package.json lookup logic in api-extractor really doesn't like that though, as it enforces
* that the 'name' field exists in all package.json files that it discovers. This below is just
* making sure that we ignore those file package.json files instead of crashing.
*/
const {
PackageJsonLookup,
@@ -61,6 +67,7 @@ const DOCUMENTED_PACKAGES = [
'packages/cli-common',
'packages/config',
'packages/config-loader',
// TODO(Rugvip): Enable these once `import * as ...` and `import()` PRs have landed, #1796 & #1916.
// 'packages/core',
// 'packages/core-api',
'packages/dev-utils',