stephenplusplus/wiredep — pull request #39 by donaldpipowitch (2014-03-10 15:21:04+00:00)
Title: Support less (via dynamic config prioritization of dependencies)

Don't know if this pull request is welcome or not, because some parts of `prioritizeDependencies` and I don't know If understand them completely ;)

I tried to add Less support to https://github.com/stephenplusplus/grunt-bower-install via
````
fileTypes: {
less: {
block: /(([ \t]*)\/\/\s*bower:*(\S*))(\n|\r|.)*?(\/\/\s*endbower)/gi,
detect: {
css: /@import\s['"](.+)['"]/gi,
less: /@import\s['"](.+)['"]/gi
},
replace: {
css: '@import "{{filePath}}";',
less: '@import "{{filePath}}";'
}
}
},
````
but this didn't work as expected. It wasn't caught by `prioritizeDependencies` in `lib/detect-dependencies.js`, because these function doesn't use the `fileTypes` settings which are generated later at `lib/inject-dependencies.js`. So I moved some config stuff into `wiredep.js`(which fits quite well, because all other default configs are generated here, too). Now `prioritizeDependencies` calls every detect-able file types :)