http://example.com/script.jshttp://example.com/style.csshttp://example.com/package.zip(contents will be extracted) http://example.com/package.tar(contents will be extracted)
Registered package name
jquerynormalize.css
Registered package name
jquerynormalize.css
Registered package name
jquerynormalize.css
version can be:
#
example
semver version
#1.2.3
version range
#1.2 #~1.2.3 #^1.2.3 #>=1.2.3 <2.0
Git tag
#<tag>
Git commit SHA
#<branch>
Subversion revision
#<revision>
install options
-F, --force-latest: Force latest version on conflict
-p, --production: Do not install project devDependencies
-S, --save: Save installed packages into the project’s bower.json dependencies
-D, --save-dev: Save installed packages into the project’s bower.json devDependencies
-E, --save-exact: Configure installed packages with an exact version rather than semver
The link functionality allows developers to easily test their packages. Linking is a two-step process. Using ‘bower link’ in a project folder will create a global link. Then, in some other package, bower link <name> will create a link in the components folder pointing to the previously created link. This allows to easily test a package because changes will be reflected immediately. When the link is no longer necessary, simply remove it with bower uninstall <name>.
list (列出项目已安装的包)
list options
-p, --paths: Generates a simple JSON source mapping
-r, --relative: Make paths relative to the directory config property, which defaults to bower_components
lookup (根据包名查询包的URL)
1
$ bower lookup <name>
login (github)
1
$ bower login
login options
-t, --token: Pass an existing GitHub auth token rather than prompting for username and password
prune (删除项目无关的包)
1
$ bower prune
register (注册一个包)
1
$ bower register <name> <url>
search (搜索包)
1 2
$ bower search $ bower search <name>
update (更新项目的包)
1
$ bower update <name> [<name> ..] [<options>]
update options
-F, --force-latest: Force latest version on conflict
-p, --production: Do not install project devDependencies
uninstall (删除项目的包)
1
$ bower uninstall <name> [<name> ..] [<options>]
uninstall options
-S, --save: Remove uninstalled packages from the project’s bower.json dependencies
-D, --save-dev: Remove uninstalled packages from the project’s bower.json devDependencies
unregister (Unregisters a package)
1
$ bower bower unregister <package>
version
1
$ bower version [<newversion> | major | minor | patch]
Run this in a package directory to bump the version and write the new data back to the bower.json file.