npm starts to execute many prestart scripts
you can use &&
like this
"scripts": {
"prestart": "coffee -c ./file1.coffee && coffee -c ./file2.coffee && coffee -c ./file3.coffee && coffee -c ./file4.coffee",
"start": "node ./file1.js"
},
wrap them in a parent script
"scripts": {
"prestart": "sh ./make-coffee.sh",
"start": "node ./file1.js"
},
//make-coffee.sh
#!/bin/bash
coffee -c ./file1.coffee
coffee -c ./file2.coffee
coffee -c ./file3.coffee
coffee -c ./file4.coffee
or another (unix-only) solution is to run multiple commands. I don't know what happens if the early commands fail.
"scripts": {
"prestart": "coffee -c ./file1.coffee; coffee -c ./file2.coffee; coffee -c ./file3.coffee; coffee -c ./file4.coffee",
"start": "node ./file1.js"
},