Skip to content

Commit 3101166

Browse files
feat!: update the build to use api-extractor types
This commit updates our build config to use the types generated by the API extractor. This prevents us exposing private implementation details in our type declarations that are not marked `@public`
1 parent 05a0527 commit 3101166

File tree

4 files changed

+6
-197
lines changed

4 files changed

+6
-197
lines changed

.github/workflows/docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@ jobs:
1616
- name: Install dependencies
1717
run: npm install
1818
- name: Build TypeScript project
19-
run: npm run docs
19+
run: npm run build
2020
- name: Ensure there are no changes in docs
2121
run: git diff --exit-code docs/

api-extractor.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
"dtsRollup": {
2121
"enabled": true,
22-
"untrimmedFilePath": "docs/generated/api.d.ts",
22+
"untrimmedFilePath": "build/src/index.d.ts",
2323
"omitTrimmingComments": true
2424
},
2525

docs/generated/api.d.ts

Lines changed: 0 additions & 191 deletions
This file was deleted.

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,15 @@
1818
},
1919
"scripts": {
2020
"test": "mocha build/test --recursive",
21+
"build": "npm run clean && npm run compile && npm run docs",
2122
"conformance": "./run_conformance_tests.sh",
2223
"check": "gts check",
23-
"clean": "gts clean",
24-
"compile": "rm -rf ./build && tsc -p .",
24+
"clean": "rm -rf ./build",
25+
"compile": "tsc -p .",
2526
"fix": "gts fix",
26-
"predocs": "npm run compile",
2727
"docs": "api-extractor run --local --verbose",
2828
"watch": "npm run compile -- --watch",
29-
"prepare": "npm run compile",
29+
"prepare": "npm run build",
3030
"pretest": "npm run compile"
3131
},
3232
"files": [

0 commit comments

Comments
 (0)