Q.1 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)
A. Installs the version closest to jQuery 1.9.15 successfully and adds the needed files under bower_components
B. Throws an error ‘No tag found that was able to satisfy 1.9.15
C. Installs the latest version of jQuery as 1.9.15 is not a valid version
Ans : Throws an error ‘No tag found that was able to satisfy 1.9.15
Q.2 Can multiple dependencies be installed or uninstalled?
A. No, it is not possible
B. Yes, it is possible
Ans : Yes, it is possible
Q.3 Your bower.json file shows the dependency as “angular”: “angularjs#~1.2.26”
Assuming you have ONLY following five valid versions available for Angular, what would be the latest version that gets installed when you execute “bower update”?
A. Angular 1.3.3
B. Angular 1.5.11
C. Angular 1.0.8
D. Angular 1.2.9
E. Angular 1.6.2
Ans : Angular 1.2.9
Q.4 What happens if the following is executed?
‘bower install jquery –save-dev’
A. Will install jquery and add to bower.json dependencies
B. Will fail since the save-dev option is invalid
Ans : Will install jquery and add to bower.json dependencies
Q.5 Bower can be used as a package manager for both server side and client side applications.
Ans : False
Q.6 Is Git essential for installing Bower?
A. Yes, as Git is required to access the packages for inclusion.
B. No, Git is optional since the project packages can be maintained in the local repository.
Ans : No, Git is optional since the project packages can be maintained in the local repository.
Q.7 Where are the added dependencies stored by Bower?
C. Project Dependency folder
Ans : bower_components
Q.8 How do you get the latest version of the dependencies as per the Json file installed?
A. Execute “bower update all”
B. Execute “bower update”
C. Use bower update
Ans : Execute “bower update”
Q.9 Your project uses Angular 1.2.26. However, you would like to override this version for specific needs with Angular 1.3. Which option in the bower.json file allows you to use to do so?
A. “angular”: “angularjs#~1.2.26”
B. “angular”: “angularjs#*1.2.26”
C. “angular”: “angularjs#^1.2.26”
Ans : “angular”: “angularjs#^1.2.26”
Q.10 When the dependencies are added through Bower, how do you refer them in your HTML/CSS code, etc.?
A. Provide the path of the dependency from Git
B. Execute ‘bower path’ and pick the path of the dependencies for inclusion
C. Execute ‘bower list -path’ and pick the path of the dependencies for inclusion
Ans : Execute ‘bower list -path’ and pick the path of the dependencies for inclusion
Q.11 When does bower.json get created?
A. bower.json gets created when ‘bower init’ is run
B. When a dependency is installed, both bower_components and bower.json get created
C. When bower is installed, bower.json gets created automatically
Ans : bower.json gets created when ‘bower init’ is run
Q.12 You have added a new dependency in the middle of the project. How do you get this new dependency shared across with everyone in the team?
A. Use –save option. The dependency gets added to the .json file which can be distributed to others.
B. Use commit option. This gets committed to the repository.
C. Use cache list to reproduce the new dependency to others.
Ans : Use –save option. The dependency gets added to the .json file which can be distributed to others.