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

Run cli from node JS #26

Open
alexeybondarenko opened this issue Jan 8, 2018 · 6 comments
Open

Run cli from node JS #26

alexeybondarenko opened this issue Jan 8, 2018 · 6 comments

Comments

@alexeybondarenko
Copy link
Contributor

alexeybondarenko commented Jan 8, 2018

@tsuyoshiwada I'm working on the project, that has several themes and I have to capture some of these themes. I've written the addon that adds variants to the Storybook Pannel and they can be configurable in storybook config.

Now, I'm looking for the way to run capture phase multiple times, with changes in the storybook instance. Looks like this can be done if I would be able to run addon cli from NODE JS script, that will allow me to run capturing manually.

What do you think about this?

@alexeybondarenko
Copy link
Contributor Author

alexeybondarenko commented Jan 8, 2018

So I propose to extract the runner from the addon to be able to use it in the node js script.

e.g.

new screenshotInstance = new ScreenshotStorybook(channel)

screenshotInstance.capture({ /**..some capture options **/ })
screenshotInstance.capture({ /**..another capture options **/ })

@wadackel
Copy link
Collaborator

wadackel commented Jan 8, 2018

Hi @alexeybondarenko I appreciate the attractive proposal!
I agree that it will become operable from a script.

I think that I will also consider the API with reference to what you suggested 😃

@alexeybondarenko
Copy link
Contributor Author

@tsuyoshiwada I think I can make the PR with these changes If you agree in general with this feature 😄

@wadackel
Copy link
Collaborator

wadackel commented Jan 8, 2018

@alexeybondarenko Thanks 👍 !!

The other day, I changed the code base greatly.
Please contact us whenever you need help. 😄

@alexeybondarenko
Copy link
Contributor Author

alexeybondarenko commented Jan 12, 2018

@tsuyoshiwada I have troubles with that. Probably, you can help me to create the example?

@wadackel
Copy link
Collaborator

@alexeybondarenko

of course 💪 !!
Specifically, what kind of help do I need?

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

No branches or pull requests

2 participants