sapegin/grunt-bower-concat — pull request #35 by cetra3 (2014-10-29 05:24:57+00:00)
Title: mainFile option does not work if mainfile is valid

This is a weird one, but say you have a dependancy on something like bootstrap, and you don't want to concatenate every one of the main js files. You want to select which ones you want.

So you have a bower_concat task in grunt a bit like this:
```
bower_concat: {
all: {
dest: 'public/depends.js',
cssDest: 'public/depends.css',
mainFiles: {
'bootstrap' : "js/modal.js"
},
}
},
```

The intention here is to only include `js/modal.js` from the bootstrap module.

The error I get is as follows:
```
Fatal error: Arguments to path.join must be strings
TypeError: Arguments to path.join must be strings
at path.js:360:15
at Array.filter (native)
at Object.exports.join (path.js:358:36)
at findMainFiles (/opt/example/node_modules/grunt-bower-concat/tasks/bower-concat.js:197:58)
```

So if there is a correct main file, and you try to override which ones you actually want with the above option, you get the error accordingly.

This pull request resolves the error, but is probably not the correct fix.