-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add github action to update doc #37
Conversation
…ct-components into dev/automate-update-doc
updated build command to delete lib before creating build and running api extractor
@@ -10,12 +10,10 @@ | |||
"src" | |||
], | |||
"scripts": { | |||
"build": "tsc && npm run api-extractor && npm run generate-docs", | |||
"build-ci": "tsc && npm run api-extractor-ci && npm run generate-docs", | |||
"build": "rm -rf lib && tsc && npm run api-extractor && npm run generate-docs", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've sometimes seen typescript not remove files it should (or that I think it should, anyway), like when I removed components/Filters.tsx, and added the components/Filters folder - imports for components/Filters would point to Filters.tsx instead of Filters/index.tsx. But I've also seen it work as I expect, where it removes the stale files. Do we kind of know why this sometimes happens (or maybe it always happens and I misremembered) and do we need it in all our typescript libs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From my understanding, typescript compiler does not clean or delete files from its outDir folder. It just overwrite files if there's an update but the old ones stay. This was causing problem for me locally with api extractor picking up errors from old generated build files. Looking at these issues (microsoft/TypeScript#13722, microsoft/TypeScript#16057), doesn't look like there's a native solution other than adding some watch functionality or manual clean command.
add a github action to automate a commit for updating docs if it's out of date. The action will run api extractor in local mode to build api report file, and the logLevel is updated to 'error' so api extractor will fail in local mode and action will exit with non-zero code also update build command to remove lib folder before running tsc and api extractor to ensure there's no old files in lib that may generate errors in local build. J=SLAP-1902 TEST=auto made a small change to a file's doc and push to pr. see that a commit is made from github action to update docs.
add a github action to automate a commit for updating docs if it's out of date. The action will run api extractor in local mode to build api report file, and the logLevel is updated to 'error' so api extractor will fail in local mode and action will exit with non-zero code
also update build command to remove lib folder before running tsc and api extractor to ensure there's no old files in lib that may generate errors in local build.
J=SLAP-1902
TEST=auto
made a small change to a file's doc and push to pr. see that a commit is made from github action to update docs.