chore(docs): ensure old docs are removed when generating (#7308)

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.
This commit is contained in:
Jack Franklin 2021-06-10 09:30:40 +01:00 committed by GitHub
parent a91b8aca37
commit c07e6d4fa9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 3 deletions

1
.gitignore vendored
View File

@ -20,3 +20,4 @@ test/coverage.json
temp/ temp/
new-docs/ new-docs/
puppeteer.tgz puppeteer.tgz
docs-api-json/

View File

@ -8,7 +8,8 @@
}, },
"docModel": { "docModel": {
"enabled": true "enabled": true,
"apiJsonFilePath": "<projectFolder>/docs-api-json/<unscopedPackageName>.api.json"
}, },
"dtsRollup": { "dtsRollup": {

View File

@ -35,8 +35,9 @@
"tsc-esm": "tsc -b src/tsconfig.esm.json", "tsc-esm": "tsc -b src/tsconfig.esm.json",
"apply-next-version": "node utils/apply_next_version.js", "apply-next-version": "node utils/apply_next_version.js",
"test-install": "scripts/test-install.sh", "test-install": "scripts/test-install.sh",
"generate-d-ts": "api-extractor run --local --verbose", "clean-docs": "rimraf new-docs && rimraf docs-api-json",
"generate-docs": "npm run generate-d-ts && api-documenter markdown -i temp -o new-docs", "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-correct-devtools-protocol-revision": "ts-node -s scripts/ensure-correct-devtools-protocol-package",
"ensure-pinned-deps": "ts-node -s scripts/ensure-pinned-deps", "ensure-pinned-deps": "ts-node -s scripts/ensure-pinned-deps",
"test-types-file": "ts-node -s scripts/test-ts-definition-files.ts", "test-types-file": "ts-node -s scripts/test-ts-definition-files.ts",