grunt 1.0.3和sailsjs具有很高的CPU使用率

时间:2018-08-02 19:57:52

标签: node.js gruntjs sails.js grunt-contrib-watch

这是我的watch.js文件:

module.exports = function (grunt) {

grunt.config.set('watch', {
assets: {

  // Assets to watch:
  files: [
    'assets/**/*',
    'tasks/pipeline.js',
    '!**/node_modules/**',
    '!assets/images/**' // <- Added this line to stop watching
  ],

  // When assets are changed:
  tasks: [
    'syncAssets',
    'linkAssets'
  ]
}
});

我跟随this减少了文件夹更改的注意,但无济于事。 另外,我删除了任务文件夹以及Gruntfile.js文件,以停止使用grunt,但是在服务器上执行htop仍然显示grunt占用了CPU。

1 个答案:

答案 0 :(得分:0)

将其添加到options : { interval: 1000 }的监视脚本Gruntfile.js