Run multiple processes (multiple watch commands)

Viewed 2314

I'm trying to make a Makefile that executes multiple commands. Example:

script:
  cat scripts/*.js > public/scripts/scripts.js

vendor:
  cat vendor/*.js > public/scripts/vendor.js

watchStyles:
  stylus -w -u nib styles/styles.styl -o public/styles

watchScripts:
  watchr -e "watch('scripts/.*\.js') {system 'make scripts'}"

watchVendor:
  watchr -e "watch('vendor/.*\.js') {system 'make vendor'}"

Right now I have to open up 3 terminals, which is annoying. How can I run only one via make watch?

watch: watchStyles watchScripts watchVendor
1 Answers
Related