I have the following grunt concat task. How can I make concat ignore all minified files? This doesn't work.
concat: {
js: {
src: [
'<%= globalConfig.bar %>',
'<%= globalConfig.foo %>/*.js',
'<%= globalConfig.foo %>/!*.min.js',
'<%= globalConfig.fooLib %>/*.js',
'<%= globalConfig.fooLib %>/!*.min.js'
],
dest: '../../foo/fooCombined.js'
},
css: {
src: ['<%= globalConfig.foo %>/*.css'],
dest: '../../foo/fooCombined.css'
}
},
This also doesn't work:
'<%= globalConfig.fooLib %>/(*.js && !*min.js)'
Any help is appreciated. Thanks.
Try this:
concat: {
js: {
src: [
'<%= globalConfig.bar %>',
'<%= globalConfig.foo %>/*.js',
'<%= globalConfig.fooLib %>/*.js',
'!**/*.min.js'
],
dest: '../../foo/fooCombined.js'
},
css: {
src: ['<%= globalConfig.foo %>/*.css'],
dest: '../../foo/fooCombined.css'
}
},
Negate or !
is placed at the beginning of a valid pattern to produce the opposite effect. Patterns are processed in order, so placing a negated pattern that you wish to exclude at the end, will do the trick.
See http://gruntjs.com/configuring-tasks#globbing-patterns for more info.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With