1
看来,当nodemon运行时,其他任务将处于挂起状态而未运行。我怎样才能使用它们?或者我是否可以使用nodemon观看较少的文件并编译它们?同时使用grunt-contrib-less和grunt-nodemon
这里是我的Gruntfile.js:
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
nodemon: {
dev: {
options: {
file: 'app.js',
nodeArgs: ['--debug'],
env: {
PORT: '3000'
}
}
}
},
less: {
development: {
options: {
paths: ['./public/less'],
yuicompress: true
},
files: {
'./public/css/test.css': './public/less/test.less'
}
}
},
watch: {
files: "./public/less/*.less",
tasks: ['less']
}
});
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-less');
grunt.loadNpmTasks('grunt-nodemon');
grunt.registerTask('default', ['less','watch']);
};
嗯......你可能需要在单独的终端上运行'grunt nodemon'和'grunt watch'任务。他们都坐着等待变化,所以我不知道如何能够与其他人同时跑步。 – jakerella