Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
feat!: update the build to use api-extractor types (#383)
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`
  • Loading branch information
matthewrobertson committed Nov 10, 2021
1 parent 05a0527 commit 752c49c
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 198 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Expand Up @@ -16,6 +16,6 @@ jobs:
- name: Install dependencies
run: npm install
- name: Build TypeScript project
run: npm run docs
run: npm run build
- name: Ensure there are no changes in docs
run: git diff --exit-code docs/
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Expand Up @@ -16,5 +16,5 @@ jobs:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
run: |
npm install
npm run compile
npm run build
npm publish
2 changes: 1 addition & 1 deletion api-extractor.json
Expand Up @@ -19,7 +19,7 @@

"dtsRollup": {
"enabled": true,
"untrimmedFilePath": "docs/generated/api.d.ts",
"untrimmedFilePath": "build/src/index.d.ts",
"omitTrimmingComments": true
},

Expand Down
191 changes: 0 additions & 191 deletions docs/generated/api.d.ts

This file was deleted.

6 changes: 3 additions & 3 deletions package.json
Expand Up @@ -18,15 +18,15 @@
},
"scripts": {
"test": "mocha build/test --recursive",
"build": "npm run clean && npm run compile && npm run docs",
"conformance": "./run_conformance_tests.sh",
"check": "gts check",
"clean": "gts clean",
"compile": "rm -rf ./build && tsc -p .",
"compile": "tsc -p .",
"fix": "gts fix",
"predocs": "npm run compile",
"docs": "api-extractor run --local --verbose",
"watch": "npm run compile -- --watch",
"prepare": "npm run compile",
"prepare": "npm run build",
"pretest": "npm run compile"
},
"files": [
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
@@ -1,5 +1,5 @@
{
"extends": "gts/tsconfig-google.json",
"extends": "./node_modules/gts/tsconfig-google.json",
"compilerOptions": {
"rootDir": ".",
"outDir": "build",
Expand Down

0 comments on commit 752c49c

Please sign in to comment.