2

In current project I have pretty big bower file. Many dependencies are out of dated and have hardcoded version like ~1.2. I have replaced it with "latest" and run bower install/update and everything went ok.

The problem is that I don't want to have such settings like "latest" on production server. What is the easiest way to grab current versions of bower components and put it to the bower file? aka generate bower file from existing dependencies.

Krzysztof Kaczor
  • 5,408
  • 7
  • 39
  • 47

2 Answers2

4

Using bower init, you'll be able to regenerate from scratch your bower.json file with all the current dependencies

Jscti
  • 14,096
  • 4
  • 62
  • 87
0

With bower install --save jquery#<version_number> you can install specific versions of bower components, e.g.

bower install --save jquery#1.10.2

the --save automatically adds the dependency to bower.json. Normally there is no need to edit bower.json manually.

helpermethod
  • 59,493
  • 71
  • 188
  • 276
  • Yes, I know about it but in doesn't solve my problem - I need to bower install --save every current version of software. I have dealt with whole issue like after automatically updating I type bower list and manually rewrite versions to bower.json. Stupid but it works – Krzysztof Kaczor Aug 14 '14 at 12:57