Bower

I use in this example:

Before start you have to install

nodejs and npm

sudo apt-get update
sudo apt-get install nodejs
sudo apt-get install npm

install bower

npm install bower

Add angularjs to project

bower install angularjs or bower install angularjs#1.2.15

if you have bower configuration file (bower.json) and you want add new library to configuration use:

bower install angularjs --save

Remove angularjs from project

bower uninstall angularjs

if you have bower configuration file (bower.json) and you want add remove library from configuration use:

bower uninstall angularjs --save

List of library

bower list

Check the available versions

bower info angularjs

Update all library

bower update

to update for example ony angularjs use bower install angularjs

When you collect all library for project, you can generate bower configuration file

bower init

bower.json

{
  "name": "bower",
  "version": "0.0.0",
  "authors": [
    "szalek"
  ],
  "license": "MIT",
  "ignore": [
    "**/.*",
    "node_modules",
    "bower_components",
    "test",
    "tests"
  ],
  "dependencies": {
    "angularjs": "~1.2.21",
    "bootstrap": "~3.2.0"
  }
}

you can use this file to rebuild bower_components folder with command

bower install

Custom location for bower packages

1. add file .bowerrs

{
	"directory":"lib"
}