Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set package latest version in Bower?

I was watching this nice video about requirejs, backbone and bower and something does not work for me. How can I set latest version of package in bower.json file? In video Jeff says that null should be used to define latest version like this

{     "name": "project name",     "version": "1.0.0",     "dependencies": {         "backbone-amd": null,         "underscore-amd": null,         "requirejs": null     } } 

But I have an exception in console that I can't use null value as version number. I couldn't find any info at bower wiki. Does anybody know how to solve this?

like image 904
Vitalii Korsakov Avatar asked Sep 15 '13 18:09

Vitalii Korsakov


People also ask

How do I update my bower package?

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.

How do I know my bower version?

Bower lets you query the bower registry via the command line to find a package by a given name and then list its versions. e.g.

Where does bower install packages from?

Installed packages will be placed in a bower_components directory. This is created in the folder which the bower program was executed. You can change this destination using the configuration options in a . bowerrc file.

How do you get the latest version of the dependencies as per the json file installed?

You can find the latest version of the npm added in package. json file. If you want to add the latest version either you can run npm install or npm install @latest .


1 Answers

If you are using bower version 1.2.x, this should work:

{     "name": "project name",     "version": "1.0.0",     "dependencies": {         "backbone-amd": "latest",         "underscore-amd": "latest",         "requirejs": "latest"     } } 
like image 198
Ian Lim Avatar answered Sep 20 '22 13:09

Ian Lim