Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Yeoman grunt copying whole bower_component folder for distribution

When using Yeoman with the angular generator, I build a dist by running grunt. This works great but my question is that why does the dist folder also contain all the bower components when I actually just need the min.js ones.

Is there a setting in the grunt file I can hack to get only the min.js files in a vendor folder, to keep the dist. as small as possible?

I am currently manually creating a vendor folder and copying the min.js files to it referencing them in my index.html, but it would be great if I could automate that.

like image 788
qorsmond Avatar asked Nov 07 '13 06:11

qorsmond


1 Answers

This is way Yeoman create the project and the grunt file. So you can customize the grunt.js file in order to omit the unwanted files.

In the grunt.js file replace the 'bower_components/**/*', to 'bower_components/**/*.min.js',

This will copy only the min.js files.

Hope this will help.

like image 180
kds Avatar answered Oct 10 '22 17:10

kds