Package Management With Bower | Fresco Play

Package Management With Bower | Fresco Play

Monday, May 22, 2023
~ 3 min read
Package Management With Bower | Fresco Play

Question 1: Is Git essential for installing Bower?

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


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

Answer: False.


Question 3: Can multiple dependencies be installed or uninstalled?

Answer: Yes. Possible.


Question 4: 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

Answer: Use --save option. The dependency gets added to the .json file which can be distributed to others


Question 5: Where are the added dependencies stored by bower?

Answer: bower_components


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

Answer: nan


Question 7: 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

Answer: Angular 1.2.9


Question 8: When does bower.json get created?

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


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

Answer: Execute "bower update"


Question 10: When the dependencies are added through bower, how do you refer them in your HTML / CSS etc. code?

Answer: Execute 'bower list -path' and pick the path of the dependencies for inclusion


Question 11: 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 )

Answer: Errors out saying 'No tag found that was able to satisfy 1.9.15'


Question 12: What happens if the following is executed? 'bower install jquery --save-dev'

Answer: Will install jquery and add to bower.json devDependencies


Question 13: 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?

Answer: "angular": "angularjs#^1.2.26"


Question 14: 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

Answer: 1. Angular 1.6.2 2. Angular 1.5.11 3. Angular 1.0.8


Post a comment

Comments

Join the conversation and share your thoughts! Leave the first comment.

Get your FREE PDF on "100 Ways to Try ChatGPT Today"

Generating link, please wait for: 60 seconds

Checkout all hot deals now 🔥

Search blogs

No blog posts found