Bower

From Education Centre
Revision as of 11:12, 10 February 2015 by Admin (Talk | contribs) (Getting Started)

Jump to: navigation, search

Bower works by fetching and installing packages from all over, taking care of hunting, finding, downloading, and saving the stuff you’re looking for. Bower keeps track of these packages in a manifest file, bower.json. How you use packages is up to you. Bower provides hooks to facilitate using packages in your tools and workflows.


Getting Started

Bower requires Node and npm and Git.

Search Bower packages (http://bower.io/search) - search for common package names and dependencies.

  1. Install Node JS from http://nodejs.org/
  2. Add NodeJs to Windows PATH environment variable PATH=C:\Program Files\nodejs\. Restart Windows for IntelliJ to pick this up.
  3. Bower is a command line utility. Install it with npm. globally npm install -g bower
  4. Install packages with bower install. Bower installs packages to bower_components/. i.e bower install bootstrap
    bower install <package>
  5. Save your packages to bower.json with bower init

Dependency packages are installed into your Windows account profile i.e;

D:\WorkspacePearsonBtecSpecs\spring-mvc-angularjs-sample-app-master>npm install -g bower
C:\Users\dawud\AppData\Roaming\npm\bower -> C:\Users\dawud\AppData\Roaming\npm\node_modules\bower\bin\bower
bower@1.3.12 C:\Users\dawud\AppData\Roaming\npm\node_modules\bower

Website

http://bower.io/

http://bower.io/search/ Search Bower Packages

References

IntelliJ - Using Bower Package Manager