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: initial storybook setup and shaderMaterial story #1

Merged
merged 4 commits into from
Mar 17, 2023

Conversation

servinlp
Copy link
Contributor

@servinlp servinlp commented Mar 2, 2023

Why

Add simple storybook setup to test/demo components.

What

Add a simple (HTML) storybook setup with a story for shaderMaterial.

Before this gets merged there should probably be a pipeline(?)/vercel environment to showcase the storybook on and link to in the readme.

Checklist

  • Documentation updated
  • Ready to be merged

@codesandbox-ci
Copy link

codesandbox-ci bot commented Mar 7, 2023

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 f8c888c:

Sandbox Source
cold-cloud-vdpgz5 Configuration
Ground reflections and video textures Configuration
arc-x-pmndrs-colors Configuration

@vis-prime
Copy link
Collaborator

This can be merged ?

@servinlp
Copy link
Contributor Author

I think so, we might want to add a link to the docs like with drei but not sure how/if I can set that up

@abernier
Copy link
Member

abernier commented Mar 17, 2023

I think so, we might want to add a link to the docs like with drei but not sure how/if I can set that up

Once this PR is merged, I can take care of adding a such task to the CI: storybook-building it and deploying it to github pages!

Then we could have links to individual stories.

@abernier
Copy link
Member

abernier commented Mar 17, 2023

ok, I had a try on my machine (mac m1 / node 18.14.0) and had an error while yarn storybook:

$ yarn storybook
yarn run v1.22.19
$ start-storybook -p 6006
info @storybook/html v6.5.16
info 
info => Loading presets

attention => Storybook now collects completely anonymous telemetry regarding usage.
This information is used to shape Storybook's roadmap and prioritize features.
You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:
https://storybook.js.org/telemetry

WARN Failed to load static files, no such directory: /Users/abernier/Sites/drei-vanilla/.storybook/public
WARN Make sure this directory exists, or omit the -s (--static-dir) option.
info => Loading custom manager config
info => Using implicit CSS loaders
info => Using default Webpack4 setup
Starting type checking service...
10% building 1/1 modules 0 activeinfo => Loading custom manager config
10% building 1/3 modules 2 active /Users/abernier/Sites/drei-vanilla/node_modules/webpack-hot-middleware/client.js?reload=true&quiet=false&noInfo=undefinednode:internal/crypto/hash:71
  this[kHandle] = new _Hash(algorithm, xofLen);
                  ^

Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:71:19)
    at Object.createHash (node:crypto:133:10)
    at module.exports (/Users/abernier/Sites/drei-vanilla/node_modules/webpack/lib/util/createHash.js:135:53)
    at NormalModule._initBuildHash (/Users/abernier/Sites/drei-vanilla/node_modules/webpack/lib/NormalModule.js:417:16)
    at handleParseError (/Users/abernier/Sites/drei-vanilla/node_modules/webpack/lib/NormalModule.js:471:10)
    at /Users/abernier/Sites/drei-vanilla/node_modules/webpack/lib/NormalModule.js:503:5
    at /Users/abernier/Sites/drei-vanilla/node_modules/webpack/lib/NormalModule.js:358:12
    at /Users/abernier/Sites/drei-vanilla/node_modules/loader-runner/lib/LoaderRunner.js:373:3
    at iterateNormalLoaders (/Users/abernier/Sites/drei-vanilla/node_modules/loader-runner/lib/LoaderRunner.js:214:10)
    at /Users/abernier/Sites/drei-vanilla/node_modules/loader-runner/lib/LoaderRunner.js:205:4 {
  opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
  library: 'digital envelope routines',
  reason: 'unsupported',
  code: 'ERR_OSSL_EVP_UNSUPPORTED'
}

Node.js v18.14.0
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

This error seems to be kinda related to webpack 4 along node17+ according to storybookjs/storybook#16555

Upgrading to @storybook/manager-webpack5 is reported to be a solution to this issue:

There is apparently this option:

$ npx sb init --builder webpack5

@abernier
Copy link
Member

abernier commented Mar 17, 2023

ok, I've managed to upgrade to webpack5 successfully: 93ac348

image

@abernier
Copy link
Member

abernier commented Mar 17, 2023

Plus I finally added the deploy task directly to that PR: f8c888c

once merged, the storybook build should be deployed to https://pmndrs.github.io/drei-vanilla hopefully 🤞🏻

@drcmda drcmda merged commit 4338ca2 into pmndrs:main Mar 17, 2023
@github-actions
Copy link

🎉 This PR is included in version 1.3.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@servinlp servinlp deleted the feat/storybook branch March 18, 2023 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants