2014-05-20 17 views
1

使用yeoman發生器角度全棧。yeoman nodemon注意到許多文件使用 - 觀看減少

當咕嚕推出的服務:調試

我得到:

[nodemon]看38946頁的文件 - 這可能會導致CPU使用率很高。減少使用「 - 觀察」。

如何添加此「--watch」以便它只監視特定文件夾?

+0

我也遇到了這個問題:/ –

回答

2

Grunt nodemon的配置格式已更改。

nodemon: { 
    dev: { 
    script: 'index.js', 
    options: { 
     args: ['dev'], 
     nodeArgs: ['--debug'], 
     callback: function (nodemon) { 
     nodemon.on('log', function (event) { 
      console.log(event.colour); 
     }); 
     }, 
     env: { 
     PORT: '8181' 
     }, 
     cwd: __dirname, 
     ignore: ['node_modules/**'], 
     ext: 'js,coffee', 
     watch: ['server'], 
     delay: 1, 
     legacyWatch: true 
    } 
    }, 
    exec: { 
    options: { 
     exec: 'less' 
    } 
    } 
} 

請參閱https://github.com/ChrisWren/grunt-nodemon