link

link $ bower link $ bower link <name> [<local name>] The link functionality allows developers to easily test their packages. Linking is a two-step process. Using ‘bower link’ in a project folder will create a global link. Then, in some other package, bower link <name> will create a link in the components folder pointing to the previously created link. This allows you to easily test a package because changes will be reflected immediately. When the link is no longer necessary, s

install

install $ bower install [<options>] $ bower install <endpoint> [<endpoint> ..] [<options>] Installs project dependencies recursively. Project dependencies consist of: dependencies specified in bower.json of project All “external” dependencies not specified in bower.json, but present in bower_components Any additional <endpoint> passed as an argument to this command When --save flag is used, all additional endpoint are saved to dependencies in bower.json. Bower

init

init $ bower init Interactively create a bower.json file

info

info $ bower info <package> $ bower info <package> [<property>] $ bower info <package>#<version> [<property>] Displays overall information of a package or of a particular version.

home

home $ bower home $ bower home <package> $ bower home <package>#<version> Opens a package homepage into your favorite browser. If no <package> is passed, opens the homepage of the local package.

help

help $ bower help <command> Display help information about Bower

Creating Packages

bower.json Packages are defined by a manifest file bower.json. This is similar to Node’s package.json or Ruby’s Gemfile. Interactively create a bower.json with bower init $ bower init Specification Detailed specification of bower.json file can be found in bower/spec repository. Maintaining dependencies Using bower install <package> --save will add <package> to your project’s bower.json dependencies array. # install package and add it to bower.json dependencies $ bower install <pa

Configuration

Bower can be configured using JSON in a .bowerrc file. For example: { "directory": "app/components/", "analytics": false, "timeout": 120000, "registry": { "search": [ "http://localhost:8000", "https://bower.herokuapp.com" ] } } Placement & Order The config is obtained by merging multiple configurations by this order of importance: CLI arguments via --config Environment variables Local .bowerrc located in the current working directory All .bowerrc files upwards

cache

cache $ bower cache <command> [<args>] Manage bower cache cache clean $ bower cache clean $ bower cache clean <name> [<name> ...] $ bower cache clean <name>#<version> [<name>#<version> ..] Cleans cached packages cache list $ bower cache list $ bower cache list <name> [<name> ...] Lists cached packages