close

How can I run multiple npm scripts in parallel?

Hello Guys, How are you all? Hope You all Are Fine. Today we are going to learn How can I run multiple npm scripts in parallel? in javascript. So Here I am Explain to you all the possible methods here.

Without wasting your time, Let’s start This Article.

How can I run multiple npm scripts in parallel ?

  1. How can I run multiple npm scripts in parallel ?

    can I run multiple npm scripts in parallel From windows cmd you can use start:
    "dev": "start npm run start-watch && start npm run wp-server"
    Every command launched this way starts in its own window.

  2. can I run multiple npm scripts in parallel

    can I run multiple npm scripts in parallel From windows cmd you can use start:
    "dev": "start npm run start-watch && start npm run wp-server"
    Every command launched this way starts in its own window.

Method 1

Use a package called concurrently.

npm i concurrently --save-dev

Then setup your npm run dev task as so:

"dev": "concurrently --kill-others \"npm run start-watch\" \"npm run wp-server\""

Method 2

From windows cmd you can use start:

"dev": "start npm run start-watch && start npm run wp-server"

Every command launched this way starts in its own window.

Summery

It’s all About this article. Hope all method helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which method worked for you? Thank You.

Leave a Comment