Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to match every file but one in grunt concat?

I'm using grunt to concatenate and minimize my js files, I use the following config for the concat part:

concat: {
  dist: {
    src: ['<banner:meta.banner>', 'js/*.js'],
    dest: 'js/script.js'
  }
}

It matches every file in my js folder but I need to ignore modernizr.js, is there a way to do this? I assume I'd need some pattern matching voodoo to do it but I'm not sure how.

Thanks in advance.

like image 253
Javier Villanueva Avatar asked Jun 16 '12 15:06

Javier Villanueva


1 Answers

Based on documentation I would try:

js/!(modernizr).js
(js/)!(modernizr).js
{js/}!(modernizr).js
js/!({modernizr}).js
(js/)!({modernizr}).js
{js/}!({modernizr}).js
js/!{modernizr}.js
(js/)!{modernizr}.js
{js/}!{modernizr}.js

If none of them is going to work, then probably you are of out luck...

like image 157
Ωmega Avatar answered Oct 22 '22 15:10

Ωmega