how to force bower to install a certain version of dependency -


assume bower.json file in dependencies like

"dependencies": {     "angular": "~1.5.x",     "angular-routing": "*",     "ngdialog": "*",     "requirejs": "*" } 

because angular-routing requires version of angular (say 1.2.x), bower prompts me choose version.

how force bower install angular ~1.5.x automatically?

i figured out answer. i'm sharing others:

if add dependency favorite version resolutions in bower.json, bower automatically install it. here updated bower.json:

"dependencies": {   "angular": "~1.5.x",   "angular-routing": "*",   "ngdialog": "*",   "requirejs": "*" }, "resolutions": {   "angular": "~1.5.x" } 

more information here.

update:
mattliu mentioned in comments, it's possible answer ! when library asks version of installed dependency. way you'll keep existing version , npm creates resolution config automatically.


Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -