-
-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
CLI: Add command to generate annotations file #17783
Conversation
☁️ Nx Cloud ReportCI is running/has finished running commands for commit a644602. As they complete they will appear below. Click to see the status, the terminal output, and the build insights. 📂 See all runs for this branch ✅ Successfully ran 1 targetSent with 💌 from NxCloud. |
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.
We should probably wait to merge this until #17755 is merged
a828df6
to
257e5c4
Compare
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.
Generally good! Some nitpicks
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'm unclear on the workflow here. Is the idea that the user will run this to generate an annotations file, and then will edit it down by hand to only include the pieces that they want? Based on our discussions I thought we concluded that typically users would build these files "constructively" by adding the minimal number of decorators etc. that they might need, rather than "destructively" by deleting. But maybe I misunderstood!
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.
(oops one more dupe... 🤷 )
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.
(oops duplicate)
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.
(oops another duplicate?)
Generally yes, but I thought we were going to get this PR in because it would make our experimentation easier? cc @tmeasday |
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.
Works for me. I'm not enthusiastic about it, but I'm fine if it's convenient.
We can merge & re-address in 7.0 CLI refactor if needed
Closing this as might be too impactful for the changes we are planning to do in 7.0. If we ever want this again we can revive the PR. |
Issue: N/A
What I did
The CLI now has a command to generate preset annotations file. This will get framework presets, addon presets and project annotation (preview.js) and write to a file that might look like this:
How to test
1 - Build CLI
2 - Use it locally with
sb generate-annotations
in a Storybook projectIf your answer is yes to any of these, please make sure to include it in your PR.