You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
..psst! While Bower is maintained, we recommend yarn and webpack or parcel for new front-end projects!
Bower offers a generic, unopinionated solution to the problem of front-end package management, while exposing the package dependency model via an API that can be consumed by a more opinionated build stack. There are no system wide dependencies, no dependencies are shared between different apps, and the dependency tree is flat.
Bower runs over Git, and is package-agnostic. A packaged component can be made up of any type of asset, and use any type of transport (e.g., AMD, CommonJS, etc.).
# install dependencies listed in bower.json
$ bower install
# install a package and add it to bower.json
$ bower install <package> --save
# install specific version of a package and add it to bower.json
$ bower install <package>#<version> --save
Using packages
We discourage using bower components statically for performance and security reasons (if component has an upload.php file that is not ignored, that can be easily exploited to do malicious stuff).
The best approach is to process components installed by bower with build tool (like Grunt or gulp), and serve them concatenated or using a module loader (like RequireJS).
Uninstalling packages
To uninstall a locally installed package:
$ bower uninstall <package-name>
prezto and oh-my-zsh users
On prezto or oh-my-zsh, do not forget to alias bower='noglob bower' or bower install jquery\#1.9.1
Never run Bower with sudo
Bower is a user command; there is no need to execute it with superuser permissions.
Windows users
To use Bower on Windows, you must install
Git for Windows correctly. Be sure to check the
options shown below:
Note that if you use TortoiseGit and if Bower keeps asking for your SSH
password, you should add the following environment variable: GIT_SSH - C:\Program Files\TortoiseGit\bin\TortoisePlink.exe. Adjust the TortoisePlink
path if needed.
Ubuntu users
To use Bower on Ubuntu, you might need to link nodejs executable to node:
sudo ln -s /usr/bin/nodejs /usr/bin/node
Configuration
Bower can be configured using JSON in a .bowerrc file. Read over available options at bower.io/docs/config.
Support
You can ask questions on following channels in order: