Open sebdavid opened 10 years ago
You're right. The docs are a bit misleading here. grunt-bower-task will leave only needed assets for components declared inexportsOverride
, but will fallback to default Bower's strategy for other components. Take a look at bowerOptions, probably you want to use production: true
.
As the options.bowerOptions.production
is only used when options.install=true
, the only way to have all the assets copied in the target dir, and to have the ability to reference dev-deps (for testing) is to :
I did the following:
"exportsOverride": {
"angular": {
"js": "angular.min.js*"
},
"angular-route": {
"js": "angular-route.min.js*"
},
"angular-bootstrap": {
"js": "ui-bootstrap.min.js"
},
"bootstrap": {
"css": "dist/css/bootstrap.min.css*"
},
" * ": {
}
By matching everything and mapping it to nothing only the things specified will get copied over.
Hi,
I'm trying to use exportsOverride, but I don't manage to skip the copy of devDependencies. I'm using v0.3.4. Here is my bower.json :
I willingly removed some of the exportsOverride element to show the problem. Here is my Grunt config task :
When running
grunt bower:assets
, all the dependencies are copied tosrc/assets
: copying the files specified in the main attribute, or all the folder content (font-awesome for instance).I thought that only elements specified in exportsOverride would be copied in targetDir (only jquery in my example), as specified by https://github.com/yatskevich/grunt-bower-task/issues/27, and in the doc : "When you define "exportsOverride" only asset types and files specified by you will be copied to ./lib"