I listed (and/or installed) several dependencies with Bower inside the bower.json
file and/or with
bower install https://github.com/username/project.git
That worked fine.
Now I can list all them with
bower list
and then I can pick the name of each dependency of my project and run
bower update dependency-name
Question: How can I bulk update all of them? Or do I have to write a shell script to loop through and update them?
If there aren't that many bower packages you have installed, try writing bower install [package_name] --save . This will just update your bower. json file.
Bower has been deprecated. However, it is not recommended given the rise of other package managers like NPM.
Bower is a great dependency manager that's specially created to help you manage different frontend libraries. It reduces the time and energy you need to spend hunting around the web for libraries like Susy and jQuery by helping you install, update or delete them with a single command.
The link functionality allows developers to easily test their packages. Linking is a two-step process. Using 'bower link' in a project folder will create a global link. Then, in some other package, bower link <name> will create a link in the components folder pointing to the previously created link.
You can update all by running bower update
.
Use the -h
flag on any command to see how you can use it. Eg bower update -h
.
This process is a little slow but is secure because you can realize when your app gets broken.
lets say that you want to update bootstrap you just need to run bower install --save bootstrap
and you bower.json file will be updated
{ "name": "my-awesome-app", "version": "0.0.0", "dependencies": { "bootstrap": "~3.0.0", "requirejs": "~2.1.11", "modernizr": "~2.8.2", "jquery": "~2.1.1", "underscore-amd": "~1.5.2", "backbone-amd": "~1.1.0", "require-handlebars-plugin": "~0.8.0" } }
{ "name": "my-awesome-app", "version": "0.0.0", "dependencies": { "bootstrap": "~3.3.1", "requirejs": "~2.1.11", "modernizr": "~2.8.2", "jquery": "~2.1.1", "underscore-amd": "~1.5.2", "backbone-amd": "~1.1.0", "require-handlebars-plugin": "~0.8.0" } }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With