Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

A package manager for the web

License

NotificationsYou must be signed in to change notification settings

bower/bower

Repository files navigation

BuildBackers on Open CollectiveSponsors on Open Collective

..psst! While Bower is maintained, we recommendyarn andwebpack orparcel for new front-end projects!


Bower offers a generic, unopinionated solution to the problem offront-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.).

View complete docs onbower.io

View all packages available through Bower's registry.

Install

$ npm install -g bower

Bower depends onNode.js andnpm. Also make sure thatgit is installed as some bowerpackages require it to be fetched and installed.

Usage

See complete command line reference atbower.io/docs/api/

Installing packages and dependencies

# 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 anupload.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 (likeGrunt orgulp), and serve them concatenated or using a module loader (likeRequireJS).

Uninstalling packages

To uninstall a locally installed package:

$ bower uninstall<package-name>

prezto and oh-my-zsh users

Onprezto oroh-my-zsh, do not forget toalias bower='noglob bower' orbower 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 installGit for Windows correctly. Be sure to check theoptions shown below:

Git for Windows

Git for Windows

Note that if you use TortoiseGit and if Bower keeps asking for your SSHpassword, you should add the following environment variable:GIT_SSH - C:\Program Files\TortoiseGit\bin\TortoisePlink.exe. Adjust theTortoisePlinkpath if needed.

Ubuntu users

To use Bower on Ubuntu, you might need to linknodejs executable tonode:

sudo ln -s /usr/bin/nodejs /usr/bin/node

Configuration

Bower can be configured using JSON in a.bowerrc file. Read over available options atbower.io/docs/config.

Support

You can ask questions on following channels in order:

Contributing

We welcomecontributions of all kinds from anyone. Please take a moment to review theguidelines for contributing.

Note that on Windows for tests to pass you need to configure Git before cloning:

git config --global core.autocrlf input

Backers

Support us with a monthly donation and help us continue our activities. [Become a backer]

License

Copyright (c) 2012-present Twitter andother contributors

Licensed under the MIT License


[8]ページ先頭

©2009-2025 Movatter.jp