Tag: grunt contrib watch

如何同时运行两个grunt监视任务

是否可以同时运行两个监视任务? 据我所知,我可以在手表设置中执行任意数量的任务,只需启动grunt手表就可以看到所有这些,就像这样 … watch: { A: { files: "js/dev/**/*.coffee", tasks: ["coffee", "requirejs"] }, B: { files: "js/dev/**/*.coffee", tasks: ["coffee"] }, C: { files: "js/dev/**/*.html", tasks: ["copy"] } } … …但我不需要这个 我只是想有不同的开发和生产任务。 你可以猜到, A (生产)和B (开发)之间唯一的区别是缩小和拼接。 我不需要同时启动A和B任务。 首先我带着这个想法来 grunt.registerTask("prod", ["watch:A", "watch:C"]); grunt.registerTask("dev", ["watch:B", "watch:C"]); 但是这不起作用。 只是第一个观看任务正在工作( C从来没有工作)。 有可能做我想做的事吗?

咕噜扔“recursionprocess.nextTick检测”

我使用nodejs v0.10.26运行Lion 10.9.2 我想在sass文件上设置一个自动编译,并用grunt实时重新加载,没有什么复杂的,但是… 运行grunt watch ,出现以下错误 (node) warning: Recursive process.nextTick detected. This will break in the next version of node. Please use setImmediate for recursive deferral. util.js:35 var str = String(f).replace(formatRegExp, function(x) { ^ RangeError: Maximum call stack size exceeded 这里是Gruntfile.js module.exports = function(grunt) { // Project configuration. grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), sass: { dist: […]