Joel Worsham
Joel Worsham

Reputation: 1150

WebStorm run/debug allow multiple scripts

Using the "Run/Debug Configurations" tool in WebStorm, I would like to create one script that ends up running multiple npm scripts. For example, I would like to create a single script that will end up executing npm run script-one && npm run script-two.

Is this possible?

Upvotes: 1

Views: 2019

Answers (2)

Alex K
Alex K

Reputation: 1

In addition to running the configurations in parallel using the compound type as specified in this answer, you can also run it sequentially.

To do this, use the Before launch section. This applicable not only to WebStorm, but for IDEA too.

Upvotes: 0

LazyOne
LazyOne

Reputation: 165443

You can use Compound type of Run/Debug Configuration.

For example, you may want to run the sequence of several test configurations, or run several configurations of different types (for example, JavaScript, HTML, etc). WebStorm provides you with the dedicated capability for that: a compound Run/Debug configuration. Compound configuration can include multiple configurations of the same or different type with the same or different specified targets.

When you run or debug your code using a compound configuration, you actually launch a sequence of configurations it includes in order they are listed.


Another possible idea: use "Before launch" section to run some other tasks before executing current one: https://www.jetbrains.com/help/webstorm/run-debug-configuration-npm.html#before-launch-options

Upvotes: 6

Related Questions