Skip to content

Commit 323c72e

Browse files
committed
Update the init template to document the glob syntax
1 parent 4093a0f commit 323c72e

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

apps/api-extractor/src/generators/DtsRollupGenerator.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ export class DtsRollupGenerator {
107107
if (entity.astEntity instanceof AstImport) {
108108
// Note: it isn't valid to trim imports based on their release tags.
109109
// E.g. class Foo (`@public`) extends interface Bar (`@beta`) from some external library.
110-
// API-Extractor cannot trim `import { Bar } from "externa-library"` when generating its public rollup,
110+
// API-Extractor cannot trim `import { Bar } from "external-library"` when generating its public rollup,
111111
// or the export of `Foo` would include a broken reference to `Bar`.
112112
const astImport: AstImport = entity.astEntity;
113113
DtsEmitHelpers.emitImport(writer, entity, astImport);

apps/api-extractor/src/schemas/api-extractor-template.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,19 @@
5353
* For example, suppose that Webpack is used to generate a distributed bundle for the project "library1",
5454
* and another NPM package "library2" is embedded in this bundle. Some types from library2 may become part
5555
* of the exported API for library1, but by default API Extractor would generate a .d.ts rollup that explicitly
56-
* imports library2. To avoid this, we can specify:
56+
* imports library2. To avoid this, we might specify:
5757
*
5858
* "bundledPackages": [ "library2" ],
5959
*
6060
* This would direct API Extractor to embed those types directly in the .d.ts rollup, as if they had been
6161
* local files for library1.
62+
*
63+
* The "bundledPackages" elements may specify glob patterns using minimatch syntax. To ensure deterministic
64+
* output, globs are expanded by matching explicitly declared top-level dependencies only. For example,
65+
* the pattern below will NOT match "@my-company/example" unless it appears in a field such as "dependencies"
66+
* or "devDependencies" of the project's package.json file:
67+
*
68+
* "bundledPackages": [ "@my-company/*" ],
6269
*/
6370
"bundledPackages": [],
6471

0 commit comments

Comments
 (0)