Bower is a package manager which manages dependencies for web sites. Web sites are made of lots of things: frameworks, libraries, assets, utilities, etc. Bower manages all these things for you. 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 called bower.json.
How you use packages is up to you. Bower provides hooks to facilitate using packages in your tools and workflows. Bower is optimized for the front-end. Bower uses a flat dependency tree, requiring only one version for each package, reducing page load to a minimum.
Bower provides support for a large number of packages. About 2.000 packages are currently supported and this number is growing. The packages are listed on the Browser website and you can browse and search them here.
The following prerequisites must be met to run Bower.
- Bower requires at least version 0.8 of Node.js. It is required for two reasons:
- Node.js is needed to run Bower.
- The Node Package Manager (npm), which is a part of the Node.js framework, is the easiest way to download and install Bower.
- Bower requires Git.
These are the installation steps for Windows. For Linux the installation is much easier as you can use the package manager of your Linux distribution.
- Download and install Node.js.
- Download and install Git.
- Download and install Bower using the following npm command:
npm install -g bower
Now, Bower and all its dependencies have been installed you are ready to use it. How? This will be the subject of a future post or checkout the post listed under references. Or you can use the
bower help command to get started.
- Meet Bower: A Package Manager For The Web: Nice tutorial on how to use Bower.