js-kyle / mincer

Sprockets inspired web assets compiler for Node.js
http://js-kyle.github.io/mincer/
MIT License
628 stars 84 forks source link

Manifest#compile does not support regExp files patterns. #216

Open olpapchenko opened 8 years ago

olpapchenko commented 8 years ago

Hi, <Manifest#compile> can not be used with RegExp patterns for files. While passing RegExp to the compile method we will get exception, because it assumes that files array can contain only strings. Here is the problem https://github.com/nodeca/mincer/blob/master/lib/mincer/manifest.js#L217. <isAbsolute> iterator is called for each file entry, if calling it with regExp obviously we will get an error. Can this be fixed by simpy filtering regExps from files array before calling <isAbsolute> method? I have tried locally and after that i was able to use RegExps at the file array for <Manifest#compile>