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

--add-storybook command does not bootstrap a context aware configuration #31

Closed
lihbr opened this issue Jul 10, 2020 · 3 comments
Closed
Labels
bug Something isn't working

Comments

@lihbr
Copy link
Member

lihbr commented Jul 10, 2020

Version

  • Prismic CLI version (know it by running prismic --version): 3.8.0-beta.0

Reproduction

  1. Bootstrap a Slice Machine project with Nuxt.js or Next.js then run add-storybook

What is expected?

Not sure to what extent it's one of our goals but it'd be truly awesome if Slice Machine was able to output a right Storybook config depending on your libraries requirements.

What is actually happening?

Slice Machine --add-storybook command just bootstrap a standard Storybook config, letting the user configure it on its own later on.

Any additional information

Well as I said it's a tough one as we cannot guess libraries requirements easily or we can capture user intention with an interactive prompt while running the --add-storybook command but then we're still facing a lot of edge cases.

For Vue libraries basically:

And the list could go on with future libraries, what if someone makes a Slice Machine library based on Stylus? Vuetify? Bootstrap? Basically any dependencies of a library should be both handled by the framework using it and the Storybook documenting it.

An attempt at solving this issue could be leveraging functions like getWebpackConfig for Nuxt.js and similar for Next.js to attempt to merge it with Storybook's one in order for users to configure it only at one place, this will cover most cases but not all, more about it here.

@lihbr lihbr added the bug Something isn't working label Jul 10, 2020
@Duaner
Copy link
Contributor

Duaner commented Jul 20, 2020

Maybe it will be interesting to introduce an automated process on the CLI to fasten your automation like the one nuxtjs is offering at the creation of your project.

Asking you which framework you're using.
Like Saas
Tailwind?

If we are recreating npx -p @storybook/cli sb init --type vue can we just run the command in the add storybook command when we do add storybook for the first launch? @hypervillain @lihbr

Can we use the nuxt config to see that if they already configured it in their nuxt project ?

@lihbr
Copy link
Member Author

lihbr commented Sep 1, 2020

In August Nuxt.js came up with an official Storybook module, providing users with a context aware configuration for Nuxt project out of the box, therefore simplifying our work for this framework.

@hypervillain and I will update the --add-storybook command to reflect those changes for Nuxt.js, closing part of this issue.

@lihbr
Copy link
Member Author

lihbr commented Feb 17, 2021

prismicio/prismic-cli#62 has been merged in mm/meta-2020, closing~

@lihbr lihbr closed this as completed Feb 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants