prismicio / sm-documentation

4 stars 5 forks source link

[Docs update] Add Storybook command update for Nuxt.js #20

Closed lihbr closed 3 years ago

lihbr commented 4 years ago

1. Quick Description of the change:

Switched to @nuxtjs/storybook for bootstraping Storybook with Nuxt.js, now providing a context aware bootstrap.

2. Link to the page(s) where the information needs updated:

https://www.slicemachine.dev/documentation/nuxt/prismic-cli-commands-options#add-a-storybook + the not found linked page (?)

3. Extra information if needed (links to github discussion etc.):

  1. Install beta version of Prismic CLI:

    $ yarn global add prismic-cli@3.8.0-beta.1
    # or
    $ npm install --global prismic-cli@3.8.0-beta.1
  2. On any Slice Machine project with local slices run:

    $ prismic sm --add-storybook
  3. If everything went well it should install Storybook, register stories from your library and open Storybook in your browser at the end.

Ongoing PR: https://github.com/prismicio/prismic-cli/pull/62

phillysnow commented 4 years ago

page documenting this process: https://slice-machine.prismic.io/documents~r=Xza7BhAAACUA1Y-s&b=upcoming%3AXza7BhAAACUA1Y-s&c=release%3AXza7BhAAACUA1Y-s&l=en-us/X1jC4RAAAC1KbJR4/

pvpg commented 4 years ago

@lihbr I tested it and it worked really well, except that it doesn't automatically open the browser at the end, I still needed to run npm run storybook. I also updated the doc that Phil shared just before