Bower Overview

  • Package manager for JavaScript components
  • Allows you to version JavaScript components

Install Bower

  • The command below will globally install Bower
npm install bower -g

Initialize Bower

  • Run the following command at the root of your project to initialize bower
  • During the installation, if you are prompted for any questions, go with the defaults
  • This ends up generating a bower.json file
bower init

Bower Package Installation Examples

Below is an example of how to install angular using bower

bower install angular

List Bower Packages and their dependencies

bower list

Update all packages going through the dependency chain

It's important to use bower update instead of just updating a specific module so that it can look at the dependency chain and update all of the modules accordingly. Otherwise, you will attempt to update a specific module and it will not update since there is another module depending on that specific version.

bower update