Running Node app through Grunt

后端 未结 2 2148
臣服心动
臣服心动 2020-12-16 16:23

I am trying to run my Node application as a Grunt task. I need to spawn this as a child process, however, to allow me to run the watch task in parallel.

This works:<

2条回答
  •  盖世英雄少女心
    2020-12-16 17:02

    This is because grunt-contrib-watch currently spawns all task runs as child processes. So the variable child is not within the same process context. Fairly soon, grunt-contrib-watch@0.3.0 will be released with a nospawn option. This will let you configure the watch to spawn task runs within the same context and would make your above example work.

    Take a look at this issue for a little more information:

    https://github.com/gruntjs/grunt-contrib-watch/issues/45

提交回复
热议问题