Ciao,
ho questo file Grunt che senza l'utilizzo dei target funziona regolarmente
codice:
module.exports = function (grunt) {
// Configurazione del progetto.
grunt.initConfig({
jshint: {
options: {
reporter: require('jshint-stylish') // use jshint-stylish to make our errors look and read good
},
build: "app/dev/**/*.js"
},
watch: {
// deve: {
files: ["app/dev/index.html"],
scripts: {
files: ["Gruntfile.js"],//,/*, "app/dev/**/*.js", "<%= app.dev %>/scripts/controllers/*.js"*/
tasks: ['jshint']
}
// }
,
options: {
livereload: {
port: 9000
}
}
}
});
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-watch');
//========================= dev =============================
grunt.registerTask('default', ["jshint", "watch"/*,"bower_concat:dev"*/]);
grunt.registerTask('dev', "watch:deve");
grunt.registerTask('test', ["watch", "jshint"]);
}
;
se io decommento il target "deve" e provo ad avviare "grunt dev" (anche con o senza l'ausilio di jshint), grunt si avvia in modalità di watch, ma poi non fà nulla qualsiasi file io cambio
grunt dev
Running "watch:deve" (watch) task
Waiting...
perchè la creazione del target "deve" non fà più eseguire nulla a grunt?se io ricommento il target "deve" e avvio "grunt dev", funziona benissimo