Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Run multiple commands in a node package file?

Tags:

node.js

For example:

"scripts": {
    "watch": "coffee --watch --compile .; compass watch public/compass"
}, 

How can I get this working, so it compiles my coffescripts and my compass project?

like image 698
Joren Avatar asked May 16 '14 01:05

Joren


1 Answers

http://substack.net/task_automation_with_npm_run

sequential sub-tasks

If you have 2 tasks you want to run in series, you can just npm run each task separated by a &&:

"build": "npm run build-js && npm run build-css"

parallel sub-tasks

If you want to run some tasks in parallel, just use & as the separator!

"watch": "npm run watch-js & npm run watch-css"
like image 94
eDwaRd Avatar answered Oct 03 '22 22:10

eDwaRd