Skip to content

Commit

Permalink
chore(docs): ensure old docs are removed when generating (#7308)
Browse files Browse the repository at this point in the history
I lost time today due to some old docs files lingering for code that is now gone. To avoid that happening, let's remove the directories before generating.

As part of this work I also changed the API Extractor to not output to `temp/X.api.json` and instead `docs-api-json/X.api.json` to make it clearer what that folder is for.
  • Loading branch information
jackfranklin committed Jun 10, 2021
1 parent a91b8ac commit c07e6d4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -20,3 +20,4 @@ test/coverage.json
temp/
new-docs/
puppeteer.tgz
docs-api-json/
3 changes: 2 additions & 1 deletion api-extractor.json
Expand Up @@ -8,7 +8,8 @@
},

"docModel": {
"enabled": true
"enabled": true,
"apiJsonFilePath": "<projectFolder>/docs-api-json/<unscopedPackageName>.api.json"
},

"dtsRollup": {
Expand Down
5 changes: 3 additions & 2 deletions package.json
Expand Up @@ -35,8 +35,9 @@
"tsc-esm": "tsc -b src/tsconfig.esm.json",
"apply-next-version": "node utils/apply_next_version.js",
"test-install": "scripts/test-install.sh",
"generate-d-ts": "api-extractor run --local --verbose",
"generate-docs": "npm run generate-d-ts && api-documenter markdown -i temp -o new-docs",
"clean-docs": "rimraf new-docs && rimraf docs-api-json",
"generate-d-ts": "npm run clean-docs && api-extractor run --local --verbose",
"generate-docs": "npm run generate-d-ts && api-documenter markdown -i docs-api-json -o new-docs",
"ensure-correct-devtools-protocol-revision": "ts-node -s scripts/ensure-correct-devtools-protocol-package",
"ensure-pinned-deps": "ts-node -s scripts/ensure-pinned-deps",
"test-types-file": "ts-node -s scripts/test-ts-definition-files.ts",
Expand Down

0 comments on commit c07e6d4

Please sign in to comment.