Antonio SEO
Antonio SEO

Reputation: 497

execute several "npm scripts" in order

I would like to command "electron-packer ." (it takes some time) and then "asar pack app app.asar"

Is it possible to do this?

Or should I simply wait for the first one and command the second?

enter image description here

Upvotes: 0

Views: 56

Answers (1)

josephting
josephting

Reputation: 2665

You can queue commands like this.

npm run pack1 && npm run pack2

Or you can add another line that does the above and just run that alone.

"scripts": {
  "pack": "npm run pack1 && npm run pack2"
}

Add this inside your "scripts" and you can just run npm run pack to run both of those commands.

Upvotes: 3

Related Questions