【问题标题】:High CPU usage with grunt 1.0.3 and sailsjsgrunt 1.0.3 和sailsjs 的高CPU使用率
【发布时间】:2019-01-10 16:14:30
【问题描述】:

这是我的 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 减少文件夹 grunt 监视更改但无济于事。 另外,我删除了任务文件夹以及 Gruntfile.js 文件以停止使用 grunt,但在服务器上执行 htop 仍然显示 grunt 占用 cpu。

【问题讨论】:

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


    【解决方案1】:

    Gruntfile.jsoptions : { interval: 1000 }的监视脚本中添加这个

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2019-05-09
      • 2014-05-07
      • 1970-01-01
      • 2022-07-26
      • 2014-08-26
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多