I'm trying to start an instance of grunt watch whenever a particular project is run from VisualStudio. I have a single page-app written in ember, and compiled with grunt, which connects to a backend written with WebAPI. I'm trying to reduce friction so it's possible to Start Debugging (F5) in VS and have it get everything up and going.
If I add a post-build event to compile the app with grunt, it works fine:
node node_modules\grunt-cli\bin\grunt dev --no-color
grunt watch
never terminates, so the VisualStudio build appears to hang until you terminate the node.exe process (which is mostly expected, other than not being able to use Ctrl+Break to stop in VS):
node ../node_modules\grunt-cli\bin\grunt watch --no-color
I've tried starting with the start
command, but VisualStudio still waits for it to exit (just saying "Build started..."):
start node ../node_modules\grunt-cli\bin\grunt dev --no-color
I've also tried with start's /i
parameter, but that doesn't help. It opens a new window running grunt watch
, but the build doesn't continue (and the app doesn't start) until I close the console window.
Presumably this has something to do with the process being a child of the build process? Is there an actual way to start a background task without VisualStudio waiting on it?