szalishchuk / generator-spa

Yeoman generator for fast Single Page Application prototyping with PhoneGap integration.
MIT License
4 stars 1 forks source link

specify file reference with grunt-bower-requirejs #29

Open szalishchuk opened 10 years ago

szalishchuk commented 10 years ago

Sometime library vendor provides few different version of the script within single bower package, AMD and non-amd are the most common use cases. But they can only reference to one of them with bower.json main attribute.

I would like to be able to specify for each library, which file it should grab. If the library is not specified, default main attribute value should be used.

File path should be related to library's base path.

I imagine this to have the following looks:

....
paths: {
    'jquery': 'jquery.js',
    'underscore': 'underscore.min.js'
    'backbone': 'backbone.amd.js'
}
...

This issue is also posted at grunt-bower-requirejs github repo, therefore the fix should also make it's way to the plugin's code base through pull request.