filype
filype

Reputation: 8380

Run multiple npm scripts at once

I have a number of npm scripts that I would like to run in a sequence.

At the moment I am accomplishing this by:

npm run clean && npm run browserify && npm run test

I would like to just one npm command, is that possible?

npm run clean browserify test

Upvotes: 0

Views: 346

Answers (2)

filype
filype

Reputation: 8380

This is just a feature that npm as of v3 does not support

Upvotes: 1

user3218666
user3218666

Reputation:

If you write a script command in your package.json like:

"scripts": {
 "clean": "clean ...",
 "browserify": "browserify ...",
 "test": "test ...",
 "all": "npm run clean && npm run browserify && npm run test"
}

You will be able to run all your script with:

 npm run all

Upvotes: 0

Related Questions