1

我是新来的帆。我在用着:

  • 帆@0.10.5
  • grunt-contrib-watch@0.5.3
  • grunt-contrib-jshint@0.10.0
  • jshint@2.5.11

我一直在使用sails lift或启动我的服务器sails lift --verbose。根据风帆文件grunt default运行。第一个任务是compileAssets。以jshint. 我的compileAssets任务以watch命令结束。

当正在监视的文件发生更改时,syncAssets将运行。syncAssets与我的compileAssets任务相同。它们都以jshint.

问题是,在syncAssets运行时,它没有jshint在控制台中报告任何错误,和/或停止syncAssets任务,所以我不知道我的代码是否在不查看源代码的情况下编译。

然后我必须重新启动服务器才能找到错误,因为compileAssets会打印jshint错误。

我的任务中是否配置错误?

tasks/register/default.js -- 不变

module.exports = function (grunt) {
    grunt.registerTask('default', ['compileAssets', 'linkAssets',  'watch']);
};

任务/注册/syncAssets.js

module.exports = function (grunt) {
    grunt.registerTask('syncAssets', [
    'jshint',
    'bower',
    'clean:dev',
    'copy:dev',
    'exec:compileTemplates',
    'exec:compilePartials',
    'compass'
    ]);
};

任务/注册/compileAssets.js

module.exports = function (grunt) {
    grunt.registerTask('compileAssets', [
    'jshint',
    'bower',
    'clean:dev',
    'copy:dev',
    'exec:compileTemplates',
    'exec:compilePartials',
    'compass'
    ]);
};
4

0 回答 0