react-native icon indicating copy to clipboard operation
react-native copied to clipboard

[6.0] Add 6.0 project setup to the cli

Open lauriharpf opened this issue 4 years ago • 5 comments

Add support to initialize a React Native Storybook v6 project with the Storybook CLI.

Initial implementation plan

The relevant Storybook CLI code is here:

  • Triggering of the generator: https://github.com/storybookjs/storybook/blob/next/lib/cli/src/initiate.ts#L120
  • Generator: https://github.com/storybookjs/storybook/blob/next/lib/cli/src/generators/REACT_NATIVE/index.ts

Make a pull request to change those so that V6 Storybook React Native setup is performed instead of the V5 Storybook React Native setup.

Things to think about

The CLI init currently happens via

npx -p @storybook/cli sb init --type react_native

The React Native Storybook V6 packages are currently in @next at NPM. If we modify what --type react_native does, then we need to do two things:

  1. Accept that the V5 setup stops working when the CLI PR is merged & published (the CLI now sets up V6 Alpha instead)
  2. Make a follow-up PR that changes the dependencies to be installed from the default NPM instead of @next once the actual Storybook React Native V6 release is out

lauriharpf avatar Sep 15 '21 16:09 lauriharpf

I think that commits are cherrypicked into releases rather than including everything from next. I need to check that though.

dannyhw avatar Sep 15 '21 17:09 dannyhw

Actually spoke with them about this and commits are only cherry picked for patches so we would have to do something like a temporary project type

dannyhw avatar Sep 16 '21 17:09 dannyhw

@dannyhw, @lauriharpf and other contributors, I just wanted to say TY for all your work putting in the work to get this next release for story book. I am big user of storybook for React Native and I can't wait to start using the new features.

pang0018 avatar Sep 16 '21 21:09 pang0018

Unfortunately I'm currently too busy with other projects for the time being to continue working with this, so unassigned myself.

lauriharpf avatar Nov 09 '21 17:11 lauriharpf

No problem @lauriharpf, thanks for the update. Hope all is well.

dannyhw avatar Nov 09 '21 19:11 dannyhw

Closing since this was completed

dannyhw avatar Feb 25 '23 14:02 dannyhw