Bower用來管理項目的依賴,版本等問題node
#~1.2.3
#^1.2.3
-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 devDependenciesbower.json
with bower init
The bower.json
spec defines several options, including:jquery
name
(required): The name of your package; please see Register section for how to name your package.version
: A semantic version number (see semver).main
string or array: The primary acting files necessary to use your package.ignore
array: An array of paths not needed in production that you want Bower to ignore when installing your package.keywords
array of string: (recommended) helps make your package easier to discoverdependencies
hash: Packages your package depends upon in production. Note that you can specify ranges of versions for your dependencies.devDependencies
hash: Development dependencies.private
boolean: Set to true if you want to keep the package private and do not want to register the package in the future.--config
.bowerrc
located in the current working directory.bowerrc
files upwards the directory tree.bowerrc
file located in user’s home folder (~
).bowerrc
file located in the global folder (/
)bower_components
.60000
ms.bower init: Interactively create a bower.json file
bower list: List local packages and possible updates.
bower.commands
object.