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 support for Angular Storybook #19

Closed
jogelin opened this issue Jan 1, 2021 · 2 comments · Fixed by #20
Closed

Add support for Angular Storybook #19

jogelin opened this issue Jan 1, 2021 · 2 comments · Fixed by #20

Comments

@jogelin
Copy link

jogelin commented Jan 1, 2021

I am trying to setup this lib on my project:

  • Nrwl/NX monorepo
  • Angular components
  • Storybook 6

But I have this error when I included the react.js into my preview.js:
Module not found: Error: Can't resolve '@storybook/react' in '/Users/Jgelin/dev/grizzly/node_modules/cypress-storybook'

@NicholasBoll
Copy link
Owner

So far this package only supports react. Other frameworks could be supported by adding framework adapters (react.js is the adapter for React). You're getting this error because the React adapter requires @storybook/react and you probably don't have that as a dependency because you're probably using @storybook/angular instead.

There isn't much code in https://github.com/NicholasBoll/cypress-storybook/blob/master/react.js. There's framework specific code there that forces a Story to load (or reload) properly without a new page refresh. There's some framework agnostic code as well that could be abstracted into a common file.

I'm interested in supporting other frameworks like Angular and Vue, but an adapter hasn't been made yet. I'm open to a pull request to add support. If you're not comfortable doing so, I'm sure I'll get around to an Angular adapter at some point. I'll leave this issue open and change the title to "Add support for Angular"

@NicholasBoll NicholasBoll changed the title Module not found: Error: Can't resolve '@storybook/react' in '/***/node_modules/cypress-storybook' Add support for Angular Storybook Jan 1, 2021
NicholasBoll added a commit that referenced this issue Jan 3, 2021
NicholasBoll added a commit that referenced this issue Jan 3, 2021
* feat: Add Args support and Angular support

Fixes #19
Fixes #13
@NicholasBoll
Copy link
Owner

Fixed in https://github.com/NicholasBoll/cypress-storybook/releases/tag/v0.5.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants