I'm trying to concatenate all javascript files inside my controllers directory into one file, located one level higher. This is the code I'm using:
concat: {
dist: {
files: {
'<%= yeoman.app %>/scripts/all.js': [
'<%= yeoman.app %>/scripts/controllers/{,*/}*.js',
'<%= yeoman.app %>/scripts/controllers/{,*/}*.js'
]
}
}
}
It works fine, but I'm forced to manually type grunt concat
in console every time I change my javascript files. So I'm trying to get this done with a watcher but can't get it to work. This is my watcher code:
concat: {
files: ['<%= yeoman.dist %>/scripts/controllers/*.js'],
tasks: ['concat']
},