question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Run cli from node JS

See original GitHub issue

@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?

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
wadackelcommented, Jan 8, 2018

@alexeybondarenko Thanks 👍 !!

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

1reaction
alexeybondarenkocommented, 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 **/ })
Read more comments on GitHub >

github_iconTop Results From Across the Web

Executing Shell Commands with Node.js - Stack Abuse
Node.js can run shell commands by using the standard child_process module. If we use the exec() function, our command will run and its ......
Read more >
Execute a command line binary with Node.js - Stack Overflow
I am in the process of porting a CLI library from Ruby over to Node.js. In my code I execute several third party...
Read more >
How to Execute Shell Commands With Node.Js
How to Execute Shell Commands With Node.Js ; exec · // run the `ls` command using exec exec ; spawn · // start...
Read more >
Run Node.js scripts from the command line
The usual way to run a Node.js program is to run the globally available node command (once you install Node.js) and pass the...
Read more >
How to run `shell` and more using Node.js - NodeSource
Running subprocesses with Node.js is relatively simple. ... spawn a shell in your machine, and that's how you run shell commands using node:...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found