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
Post a Comment