首页 > 代码库 > grunt-nodemon参数配置

grunt-nodemon参数配置

grunt-nodemon参数配置

nodemon0.2.0版本后参数名称做了较大改动,调整了下nodemon的参数配置,有需要的同学可以参考下:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
nodemon: {
     dev: {
          script: ‘app.js‘,
          options: {
               args: [],
               nodeArgs: [‘--debug‘],
               ignore: [‘README.md‘‘node_modules/**‘‘.DS_Store‘],
               ext: ‘js‘,
               watch: [‘./‘],
               delay: 1000,
               env: {
                    PORT: ‘3000‘
               },
               cwd: __dirname
          }
     }
}

特别是要加上script:‘app.js‘,不然会遇到启动grunt报错

技术分享

 

grunt-nodemon参数配置