Closed tigerclaw-az closed 10 years ago
You didnot specify a target. My config:
module.exports = {
jshint: {
files: [
'<%= grunt.config.app %>/static/**/*.js',
'!<%= grunt.config.app %>/static/bower_components/**/*.js'
],
tasks: ['jshint', 'notify:jshint']
}
}
@FrankFang my jshint configuration is defined in the"jshint.js" file under my grunt/ folder.
@ejwaibel It's the same with me. But how about modify your jshint.js into this:
module.exports = {
whateverName:{
files: ['./index.html'],
options: {
livereload: true,
port: 666
},
tasks: ['jshint']
}
};
@FrankFang Do you mean modify my watch.js file? Does the load-grunt-config not set default tasks like the current initConfig() does?
e.g. If I set the following:
.... watch: { .... } ....
in the grunt.initConfig(), then grunt automatically adds a registerTask for 'watch', so that I can do this: grunt watch
without having to set grunt.registerTask('watch', ['watch'])
I set up a dummy repo to test this and I cannot reproduce: https://github.com/firstandthird/load-grunt-config-tests
Can you take a look to see if you have anything different in your setup? I'm running grunt watch
and it runs fine
@jgallen23 This problem might be caused by issue #46 , I will try testing some more and see what further information I can supply.
Ok, the issue comes into play when I try to use variables from another grunt file, try setting this in watch.js
:
files = ['<%= csslint.files =>', '<%= jshint.files =>']
then set your files in jshint.js
to this:
files = ['/js/**/*.js']
LOL! Ignore this, I guess it would help if I actually load the files for csslint! All is well with the world :)
I was attempting to run 'grunt watch' after creating my watch.js configuration:
and I was presented with a constant barrage of messages:
The only way I could exit was hitting Ctrl-C to kill the process.