-
Notifications
You must be signed in to change notification settings - Fork 116
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
chore: add create-docs script and templates #4105
Conversation
Run & review this pull request in StackBlitz Codeflow. |
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
☁️ Nx Cloud ReportCI is running/has finished running commands for commit bdc60d5. As they complete they will appear below. Click to see the status, the terminal output, and the build insights. 📂 See all runs for this CI Pipeline Execution ✅ Successfully ran 1 targetSent with 💌 from NxCloud. |
Size Change: 0 B Total Size: 1.1 MB ℹ️ View Unchanged
|
Paste Run #8883
Run Properties:
|
Project |
Paste
|
Run status |
Passed #8883
|
Run duration | 02m 04s |
Commit |
bdc60d5ff9: Merge branch 'main' into chore/plop-create-docs
|
Committer | Nora Krantz |
View all properties for this run ↗︎ |
Test results | |
---|---|
Failures |
0
|
Flaky |
0
|
Pending |
0
|
Skipped |
0
|
Passing |
67
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit bdc60d5:
|
Paste Run #8882
Run Properties:
|
Project |
Paste
|
Run status |
Passed #8882
|
Run duration | 06m 05s |
Commit |
23017cfb3b ℹ️: Merge bdc60d5ff9b8effb5a9e89b52628ec2b95bfe8f8 into 7425eceb892b15becce4ed5da13e...
|
Committer | Nora Krantz |
View all properties for this run ↗︎ |
Test results | |
---|---|
Failures |
0
|
Flaky |
0
|
Pending |
0
|
Skipped |
0
|
Passing |
125
|
In this PR
yarn create:docs
to thepackage.json
file to create a docs directory and necessary filesplopfile.js
(create-docs
)docs-index.hbs
,docs-api.hbs
, anddocs-changelog.hbs
packages/paste-website/src/pages/components/account-switcher/index.mdx
file to pull the package description from the package itself, meaning we now have a single source of truth for the package description (instead of 4). This file demonstrates the change needed to streamline the package description for all other packages. When anyone touches another website page (or just has free time/space in their PR), let's update the rest of the component website files with this same change.Limitations
There are certain places where I've added
TODO:
s to the templates. They will require attention and slight changes after the script is run. (If you have the "TODO Highlight" VS Code extension installed, theTODO:
s will all be highlighted and hard to miss.)titleCase
well, so in order for the website to build, there are a few places the case will need to be adjusted, or a space will need to be added (there's an open issue for this, I added a comment to it){{component-name}}
). That prevents me from being able to add curly brackets to the plop templates without causing plop to fail. Because our LivePreview also uses double curly bracket notation (e.g.scope={{ComponentName}}
), the brackets will have to be added after the script is runHow to test
If you want to give the new script a try to make sure it's working correctly, checkout this branch and delete an existing component's directory within
packages/paste-website/src/pages/components
and run the script for that component. Make sure the website builds after running the script, and try giving the plop prompt different variations of the component name ("progress steps", "ProgressSteps", "progress-steps", etc).