I am trying to concatenate all js files in the root and in any other folders of my app, but ignore any files in the node_modules folder. For some reason this setup still takes the node modules, too:
concat: {
dist: {
src: ['*.js', '**/*.js', '!node_modules/*.js'],
dest: 'concat.js'
}
},
Thanks so much
To negate matching the whole
node_modulesdirectory use this glob pattern:Gruntfile.jstoo, in which case you can include multiple!negation patterns.concat.jsis being written to the projects root directory, you'll need to negate that too to exclude that on subsequent runs of the task.For example: