让grunt-express-server抛出的错误不会被分解 [英] Make watch not break down on error thrown by grunt-express-server
问题描述
我使用Yeoman进行一些角度开发,包括grunt,livereload等。
我还设置了一个基本的node.js / express应用程序,使用 grunt-contrib-copy
和 grunt-express-server $ c在客户端(角色)和服务器(节点)之间共享一些JS $ c>在使用手表的每个文件保存时触发。到目前为止好!
问题是如果我在代码中引入语法错误,我想与节点共享并点击保存。语法错误显示在日志中,并打破/停止手表。然后,我必须通过执行 $ ctrl + c
和 $ grunt server
来重新启动手表。 p>
有没有办法让 grunt-express-server
不会中断/停止正在进行的手表错误是在js代码中找到的?
我是 grunt-express-server的作者
并在此处处理问题:
https://github.com/ericclemmons/grunt-express-server/issues/27
我已经能够通过运行 grunt-parallel
或 grunt-concurrent
,它可以防止错误阻止手表的执行。
I use Yeoman to do some angular development with grunt, livereload etc.
I've also set up a basic node.js/express app and I'm sharing some JS between the client (angular) and the server (node) using grunt-contrib-copy
and grunt-express-server
that fires on every file-save using watch. So far so good!
The problem is if I introduce a syntax error into the code that I want to share with node and hit save. The syntax error gets shown in the log and breaks/stops the watch. Then I have to go restart the watch in the console by doing $ ctrl+c
and $ grunt server
.
Is there a way to get grunt-express-server
not to break/stop the watch that's going on if a syntax error is found in the js code?
I'm the author of grunt-express-server
and working the issue here:
https://github.com/ericclemmons/grunt-express-server/issues/27
I've been able to work around this problem by running grunt-parallel
or grunt-concurrent
, which prevents errors from preventing execution of watch.
这篇关于让grunt-express-server抛出的错误不会被分解的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!