Movatterモバイル変換


[0]ホーム

URL:


home
Bower logo

Bower

A package manager for the web

...psst! While Bower is maintained, we recommend usingYarn andVite for front-end projects.Read how to migrate!
Menu
Sponsors (become one):
420couponcodes.comcredimaxx.deSoftwareDevelopmentUK*instinctoolsCryptoNewsZLegalbetRoute4Me Route PlannerVPN reviews 2019FaveableiBoysoftMatthew ChalkBuy RDP online from Web Pundits

Web sites are made of lots of things — frameworks, libraries, assets, and utilities. Bower manages all these things for you.

Keeping track of all these packages and making sure they are up to date (or set to the specific versions you need) is tricky. Bower to the rescue!

Bower can manage components that contain HTML, CSS, JavaScript, fonts or even image files. Bower doesn’t concatenate or minify code or do anything else - it just installs the right versions of the packages you need and their dependencies.

Toget started, Bower works by fetching and installingpackages 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 usepackages is up to you. Bower provides hooks to facilitate using packages in yourtools and workflows.

Bower is optimized for the front-end. If multiple packages depend on a package - jQuery for example - Bower will download jQuery just once. This is known as a flat dependency graph and it helps reduce page load.

Install Bower

Bower is a command line utility. Install it with npm.

$npminstall-g bower

Bower requiresnode, npm andgit.

Latest release:bower version

For troubleshooting installation on different platforms, read thetroubleshooting wiki page.

Getting started

Install packages

Install packages withbower install. Bower installs packages tobower_components/.

$bowerinstall <package>

A package can be a GitHub shorthand, a Git endpoint, a URL, and more. Read more aboutbower install.

# installs the project dependencies listed in bower.json$bowerinstall# registered package$bowerinstalljquery# GitHub shorthand$bowerinstalldesandro/masonry# Git endpoint$bowerinstallgit://github.com/user/package.git# URL$bowerinstallhttp://example.com/script.js

Search packages

Search Bower packages and find the registered package names for your favorite projects.

Save packages

Create abower.json file for your package withbower init.

Then save new dependencies to yourbower.json withbower install PACKAGE --save

Use packages

How you use packages is up to you. We recommend you use Bower together withGrunt, RequireJS, Yeoman, and lots of other tools or build your own workflow withthe API. You can also use the installed packages directly, like this, in the case ofjquery:

<scriptsrc="bower_components/jquery/dist/jquery.min.js"></script>

Twitter updates from@bower

Tweets by bower


[8]ページ先頭

©2009-2025 Movatter.jp