pmndrs / drei-vanilla

🍦 drei-inspired helpers for threejs
https://pmndrs.github.io/drei-vanilla/
MIT License
450 stars 17 forks source link

@storybook/addon-storysource #4

Open abernier opened 1 year ago

abernier commented 1 year ago

Why / What

Adding @storybook/addon-storysource to have that "Story" tab

image
codesandbox-ci[bot] commented 1 year ago

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 8b596f9530949f7068f2dc71ffb4af5994801be3:

Sandbox Source
nice-moon-lsplsu Configuration
Ground reflections and video textures Configuration
arc-x-pmndrs-colors Configuration
vis-prime commented 1 year ago

@abernier can you remove the actions tab and add the story section again ?

abernier commented 1 year ago

@vis-prime what about upgrading to sb7 instead? I've set it up for https://github.com/pmndrs/react-postprocessing/pull/202 (from scratch) and https://github.com/pmndrs/drei/pull/1450 (migration - not yet merged).

Maybe you could replicate for drei-vanilla?

vis-prime commented 1 year ago

@abernier oh yeah, i've been getting yeaa react-postprocessing version looks cool

I can just follow the instructions they provide ?

abernier commented 1 year ago

I can just follow the instructions they provide ?

you can, but I didn't find their migration script that useful: especially, it configured sb7 with @storybook/react-webpack framework while I wanted @storybook/react-vite: I add to uninstall and re-install it manually.

If I were you, I would just "copy" that diff https://github.com/pmndrs/drei/pull/1450/files :)

vis-prime commented 1 year ago

I can just follow the instructions they provide ?

you can, but I didn't find their migration script that useful: especially, it configured sb7 with @storybook/react-webpack framework while I wanted @storybook/react-vite: I add to uninstall and re-install it manually.

If I were you, I would just "copy" that diff https://github.com/pmndrs/drei/pull/1450/files :)

uninstall/ install wasn't playing nicely so i just deleted the node modules folder

edited package.json with the same versions

did npm install --legacy-peer-deps

and then

npm run storybook i get this error 'NODE_OPTIONS' is not recognized as an internal or external command, operable program or batch file.

what's NODE_OPTIONS ? i should be able to run preview the storybook locally right ?

abernier commented 1 year ago

this NODE_OPTIONS env var was added recently in drei for node 18 support: https://github.com/pmndrs/drei/issues/1424