You are on page 1of 2

Is Git essential for installing Bower?

Yes. Since Git is required to access the packages for inclusion

Bower can be used as a package manager for both server side and client side
applications.
False.

Can multiple dependencies be installed or uninstalled?


Yes. Possible.

You have added a new dependency some time in the middle of the project. How do you
get this new dependency shared across with everyone in the team

Use commit option. This gets committed to the repository


Use --save option. The dependency gets added to the .json file which can be
distributed to others 11
Use cache list to reproduce the new dependency to others

Where are the added dependencies stored by bower?


bower_components

Your bower.json file shows the dependency as "angular": "angularjs#~1.2.26"

Assuming you have ONLY following 5 valid versions available for angular, what would
be the latest version that gets installed when you execute "bower update"? Angular
1.0.8, Angular 1.2.9, Angular 1.6.2, Angular 1.5.11, Angular 1.3.3

Angular 1.2.9

When does bower.json get created?


bower.json gets created when 'bower init' is run

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

Execute "bower update all"


Execute "bower update"
Use bower update 11

When the dependencies are added through bower, how do you refer them in your HTML /
CSS etc. code?
Execute 'bower list -path' and pick the path of the dependencies for inclusion

You are trying to install a particular jQuery version 1.9.15 using bower install
angular. What happens to the installation? ( Hint - jQuery 1.9.15 is not a valid
version )

Installs latest version of jQuery since 1.9.15 is not a valid version


Installs the version closest to jQuery 1.9.15 successfully and adds the needed
files under bower_components
Errors out saying 'No tag found that was able to satisfy 1.9.15'

What happens if the following is executed?


'bower install jquery --save-dev'

Will install jquery and add to bower.json devDependencies

You might also like