Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add support for save and save-exact in .bowerrc #2161

Merged
merged 1 commit into from Jan 29, 2016

Conversation

blcook223
Copy link
Contributor

Hi all,

I'm a long-time fan and user or bower, first-time PRer. I am grateful to bower's maintainers, and I'd be glad for any feedback or suggestions.

This PR is in response to issue #1040, specifically comments from @svengt and @sheerun. It adds support for npm-like config setting set in .bowerrc. When set to true, the "save" setting causes the install and uninstall commands to act as if the user had specified --save. Likewise, when set to true, the "save-exact" setting causes the install command to act as if the user had specified --save-exact. So as not to break the API, when set to false or omitted, these commands behave as before.

One small note: lib/commands/install.js already checked for a "default-save" setting. I'm not sure if this is documented anywhere, but I left it in place in case any users are depending on this.

The install command now supports designating "save" and "save-exact"
values in .bowerrc. If the `--save` flag is not used, but the config
file sets "save" to true, the command will behave as if the `--save`
option was specified. The same is true of `--save-exact` if
"save-exact" is set to true in `.bowerrc`.

The uninstall command will also behave as if the `--save` flag had
been specified if "save" is set to true in `.bowerrc`.
@sheerun
Copy link
Contributor

sheerun commented Jan 29, 2016

Awesome PR, thank you :)

sheerun added a commit that referenced this pull request Jan 29, 2016
add support for save and save-exact in .bowerrc
@sheerun sheerun merged commit 96d986f into bower:master Jan 29, 2016
@benmann benmann mentioned this pull request Mar 1, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants