Skip to content
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

feat(storybook): ✨ added storybook files to registry and CLI #5

Merged
merged 2 commits into from
Jul 18, 2023

Conversation

lloydrichards
Copy link

I had a look into how the CLI works and came up with a solution to have the CLI add the .storybook.tsx files at the same time when using the npx shadcn-ui add command.

This was done by:

  1. move stories into the apps/www/registry folder
  2. add a new config property for storybook:true to the component.json
  3. adding the .stories.tsx to the apps/www/registry/registry.ts file
  4. making changes to the apps/www/scripts/build-registry.ts script to remove the style from the pathname on .stories.tsx if the config.storybook is true
  5. run the pnpm build to make sure the build-registry script still works

I'm not sure yet how to test this yet apart from making sure none of the CI is failing, but would be important to try this out as a beta release to make sure everything still works

@lloydrichards
Copy link
Author

@XavierGeerinck any chance to merge in this and #4 ? would be interesting to get some thoughts on the CLI feature

@XavierGeerinck XavierGeerinck merged commit 3917370 into XavierGeerinck:main Jul 18, 2023
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants