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

`--save` by default #1040

Closed
sindresorhus opened this Issue Jan 8, 2014 · 35 comments

Comments

Projects
None yet
@sindresorhus
Member

sindresorhus commented Jan 8, 2014

Since most people would want to save a dependency to bower.json when doing bower install <package> I suggest we make --save the default and introduce a --no-save flag. The default will only have an effect if there is a bower.json.

@addyosmani

This comment has been minimized.

Show comment
Hide comment
@addyosmani

addyosmani Jan 8, 2014

Member

👍

Member

addyosmani commented Jan 8, 2014

👍

@xen

This comment has been minimized.

Show comment
Hide comment
@xen

xen Jan 9, 2014

Upvote 👍

xen commented Jan 9, 2014

Upvote 👍

@svnlto

This comment has been minimized.

Show comment
Hide comment
@svnlto

svnlto Jan 9, 2014

Member

👍

Member

svnlto commented Jan 9, 2014

👍

@Anahkiasen

This comment has been minimized.

Show comment
Hide comment
@Anahkiasen

Anahkiasen commented Jan 10, 2014

👍

@sheerun

This comment has been minimized.

Show comment
Hide comment
@sheerun

sheerun Jan 10, 2014

Contributor

Of course this is 2.x feature as it breaks api.

Contributor

sheerun commented Jan 10, 2014

Of course this is 2.x feature as it breaks api.

@helmus

This comment has been minimized.

Show comment
Hide comment
@helmus

helmus commented Jan 18, 2014

👍

@hemanth

This comment has been minimized.

Show comment
Hide comment
@hemanth

hemanth Jan 18, 2014

Contributor

👍

Contributor

hemanth commented Jan 18, 2014

👍

@wibblymat

This comment has been minimized.

Show comment
Hide comment
@wibblymat

wibblymat Jan 21, 2014

Member

We could add a .bowerrc flag like save-by-default. Default to false now and flip to true for 2.x?

Member

wibblymat commented Jan 21, 2014

We could add a .bowerrc flag like save-by-default. Default to false now and flip to true for 2.x?

@sindresorhus

This comment has been minimized.

Show comment
Hide comment
@sindresorhus
Member

sindresorhus commented Jan 21, 2014

@wibblymat 👍

@gh-naylor

This comment has been minimized.

Show comment
Hide comment
@gh-naylor

gh-naylor Jan 22, 2014

+1

Would it possible to set this to --save to the <head> tag inside a given file? (index.html for example)

gh-naylor commented Jan 22, 2014

+1

Would it possible to set this to --save to the <head> tag inside a given file? (index.html for example)

@sindresorhus

This comment has been minimized.

Show comment
Hide comment
@sindresorhus

sindresorhus Jan 22, 2014

Member

@gh-naylor no, that's a task for another tool.

Member

sindresorhus commented Jan 22, 2014

@gh-naylor no, that's a task for another tool.

@benschwarz

This comment has been minimized.

Show comment
Hide comment
@benschwarz

benschwarz Jan 23, 2014

Member

👍 To @wibblymat's proposal.
Flip to true for 2.x and then deprecate the .bowerrc option.

Member

benschwarz commented Jan 23, 2014

👍 To @wibblymat's proposal.
Flip to true for 2.x and then deprecate the .bowerrc option.

@wibblymat

This comment has been minimized.

Show comment
Hide comment
@wibblymat

wibblymat Jan 27, 2014

Member

PRs welcome ;)

Member

wibblymat commented Jan 27, 2014

PRs welcome ;)

wibblymat added a commit that referenced this issue Jan 28, 2014

Merge pull request #1074 from wibblymat/save-by-default
Added a .bowerrc option to make bower install assume --save (#1040)
@ninjatronic

This comment has been minimized.

Show comment
Hide comment
@ninjatronic

ninjatronic Mar 5, 2014

I disagree. The --save option is consistent with other package managers (e.g. npm). Probably this change will be confusing to users.

ninjatronic commented Mar 5, 2014

I disagree. The --save option is consistent with other package managers (e.g. npm). Probably this change will be confusing to users.

@kevva

This comment has been minimized.

Show comment
Hide comment
@kevva

kevva Mar 5, 2014

@ninjatronic, component for example is using --saveby default, and that's probably the intended behaviour in most cases, even though npm is not using it.

kevva commented Mar 5, 2014

@ninjatronic, component for example is using --saveby default, and that's probably the intended behaviour in most cases, even though npm is not using it.

@benschwarz

This comment has been minimized.

Show comment
Hide comment
@benschwarz

benschwarz Mar 5, 2014

Member

Yeah, I think this is a solid change and we should move in that direction.
I don't care what other package managers do in this instance.

Member

benschwarz commented Mar 5, 2014

Yeah, I think this is a solid change and we should move in that direction.
I don't care what other package managers do in this instance.

@Anahkiasen

This comment has been minimized.

Show comment
Hide comment
@Anahkiasen

Anahkiasen Mar 5, 2014

Composer saves packages by default, for the note.

Anahkiasen commented Mar 5, 2014

Composer saves packages by default, for the note.

@ninjatronic

This comment has been minimized.

Show comment
Hide comment
@ninjatronic

ninjatronic Mar 5, 2014

Worth noting then that uninstall should then also be expected to remove entries from the bower.json file

ninjatronic commented Mar 5, 2014

Worth noting then that uninstall should then also be expected to remove entries from the bower.json file

@fmalk

This comment has been minimized.

Show comment
Hide comment
@fmalk

fmalk commented Mar 20, 2014

👍

@apfelbox

This comment has been minimized.

Show comment
Hide comment
@apfelbox

apfelbox Apr 15, 2014

👍 (always annoyed that other package managers don't do the same)

apfelbox commented Apr 15, 2014

👍 (always annoyed that other package managers don't do the same)

@paulirish paulirish added this to the 2.0.0 milestone Apr 15, 2014

@paulirish

This comment has been minimized.

Show comment
Hide comment
@paulirish

paulirish Apr 15, 2014

Member

Added to 2.0 milestone.

We'll need to output some message indicating the bower.json has been updated.

Member

paulirish commented Apr 15, 2014

Added to 2.0 milestone.

We'll need to output some message indicating the bower.json has been updated.

@martinkr

This comment has been minimized.

Show comment
Hide comment
@martinkr

martinkr commented May 27, 2014

+1

@chibicode

This comment has been minimized.

Show comment
Hide comment
@chibicode

chibicode Jun 8, 2014

Contributor

👍

Contributor

chibicode commented Jun 8, 2014

👍

@karin-n

This comment has been minimized.

Show comment
Hide comment
@karin-n

karin-n commented Jun 10, 2014

+1

@yumyo

This comment has been minimized.

Show comment
Hide comment
@yumyo

yumyo commented Sep 19, 2014

+1

@chuyik

This comment has been minimized.

Show comment
Hide comment
@chuyik

chuyik Oct 11, 2014

+1
How's this going? I think this should be set like npm: npm config set save true

chuyik commented Oct 11, 2014

+1
How's this going? I think this should be set like npm: npm config set save true

@tannerhodges

This comment has been minimized.

Show comment
Hide comment
@tannerhodges

tannerhodges commented Jan 16, 2015

👍

@legshooter

This comment has been minimized.

Show comment
Hide comment
@legshooter

legshooter commented Mar 4, 2015

👍

@automatix

This comment has been minimized.

Show comment
Hide comment
@automatix

automatix Apr 3, 2015

+1 for save_by_default/save_dev_by_default (true|false, default = false) and --no-save/--no-save-dev.

automatix commented Apr 3, 2015

+1 for save_by_default/save_dev_by_default (true|false, default = false) and --no-save/--no-save-dev.

@vedmant

This comment has been minimized.

Show comment
Hide comment
@vedmant

vedmant Jul 26, 2015

👍 I'm for this feature! Often forget to add --save, mostly I install package and want to save it to bower.json. Also I'm for removing .bowerrc and add directory option to bower.json, this really confused me when I learned Bower.

vedmant commented Jul 26, 2015

👍 I'm for this feature! Often forget to add --save, mostly I install package and want to save it to bower.json. Also I'm for removing .bowerrc and add directory option to bower.json, this really confused me when I learned Bower.

@fewspider

This comment has been minimized.

Show comment
Hide comment
@fewspider

fewspider commented Sep 1, 2015

👍

@svengt

This comment has been minimized.

Show comment
Hide comment
@svengt

svengt Dec 2, 2015

I would suggest to make this configurable like npm does.

$ npm config set save=true
$ npm config set save-exact=true

http://blog.heroku.com/archives/2015/11/10/node-habits-2016#2-use-a-smart-npmrc

svengt commented Dec 2, 2015

I would suggest to make this configurable like npm does.

$ npm config set save=true
$ npm config set save-exact=true

http://blog.heroku.com/archives/2015/11/10/node-habits-2016#2-use-a-smart-npmrc

@sheerun

This comment has been minimized.

Show comment
Hide comment
@sheerun

sheerun Dec 2, 2015

Contributor

Good idea. I'll accept a PR enabling it for .bowerrc (with tests).

Contributor

sheerun commented Dec 2, 2015

Good idea. I'll accept a PR enabling it for .bowerrc (with tests).

@benmann

This comment has been minimized.

Show comment
Hide comment
@benmann

benmann Mar 1, 2016

Member

I feel like #2161 is not just a neat solution but also enough to close this issue.
cc: @sheerun agree?

Member

benmann commented Mar 1, 2016

I feel like #2161 is not just a neat solution but also enough to close this issue.
cc: @sheerun agree?

@sheerun

This comment has been minimized.

Show comment
Hide comment
@sheerun

sheerun Mar 1, 2016

Contributor

yup :)

Contributor

sheerun commented Mar 1, 2016

yup :)

@sheerun sheerun closed this Mar 1, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment