-
Notifications
You must be signed in to change notification settings - Fork 1.4k
chore: speed up markdown docs script #9410
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
base: main
Are you sure you want to change the base?
Conversation
|
Build successful! 🎉 |
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 ran the command yarn workspace @react-spectrum/s2-docs generate:md on main and then on this branch (which appears to be up to date with main)
The output is different for the md files. I ran diff -r /Users/robsnow/Desktop/dist-main /Users/robsnow/Desktop/dist-new to verify
It looks like the new md files contain a lot more information? (although that any seems wrong in the function signature)
Also, sometimes the order of the values changes? I had to sort for tsdiffer otherwise it was random to an extent.
|
Build successful! 🎉 |
|
Build successful! 🎉 |
|
@snowystinger Thanks for checking that! Fixed the |
The markdown docs generation script (
yarn workspace @react-spectrum/s2-docs generate:md) was pretty slow due to repetitive sync glob and file reads. Now, we build an index of symbols and read from that instead.On my machine:
Before: 113s
After: 5s
Also includes some improvements to the markdown output in some areas where we had gaps:
✅ Pull Request Checklist:
📝 Test Instructions:
Smoke test markdown docs outputs.
🧢 Your Project: