I have the following in my Makefile to watch changes to my coffeescript and stylus files.
dev:
@make watchCoffeescript
@make watchStylus
@nodemon server.coffee
watchCoffeescript:
@coffee -wcl public/ &
watchStylus:
@find public -name '*.styl' -type f | xargs stylus --watch --compress &
The problem I’m having is that the print statements for watching and compiling the coffeescript and stylus files come after the nodemon command. Everything still works fine but it would be nice to have those print statements be displayed before my nodemon command executes for visual purposes. Is there a way to get the print statements to be displayed in order? I know I can insert something like “@sleep 2” in between the commands but was hoping there would be a better way.
You could omit the ampersands.
Or you could write a more
saneconventional makefile: