vendredi 2 janvier 2015

Is this the correct way to use Bower


I'm using Bower whereby I run bower install and it downloads dependency files to /bower_components directory. Then, I create symlinks from my /public/.. directories to the dist files:



mypc:/var/www/myproject/public/js$ ls -l
total 8
lrwxrwxrwx 1 tom tom 67 Dec 23 07:29 bootstrap.min.js -> /var/www/myproject/bower_components/bootstrap/dist/js/bootstrap.min.js
lrwxrwxrwx 1 tom tom 58 Dec 23 07:29 jquery.min.js -> /var/www/myproject/bower_components/jquery/dist/jquery.min.js


Is this the way that Bower is typically used? I'm trying to find a way to automate the process, the best I've thought is to exec a install.sh after installation but was wondering if this can be done with Bower. Is there a better/preferred way? I thought against putting the bower_components in the public directory too as there are lots of files that don't need to be there (e.g. README, src, etc). In most cases I only require one or two files from each.





Aucun commentaire:

Enregistrer un commentaire