belle tian
belle tian

Reputation: 897

what 's the differene between "bower install -save package" and "bower install package "?

I know "-save" will add a record to dependencies block in bower.json ,but I DON'T know the function of dependencies , it's just a hint text for user?

Upvotes: 0

Views: 226

Answers (1)

T.J. Crowder
T.J. Crowder

Reputation: 1074565

The --save argument tells bower to update bower.json, which lists the packages that you have installed. That way, you include bower.json and your own code in source control, but not all the bower components. When checking the project out of source control, you run bower install to install everything from bower.json in the checked-out base.

From the documentation:

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

Upvotes: 2

Related Questions