gruntfile-editor icon indicating copy to clipboard operation
gruntfile-editor copied to clipboard

#insertConfig(): Replace existing config block

Open eddiemonge opened this issue 10 years ago • 4 comments

This probably isn't needed or a good idea but if its not to hard to add an API for it, a whole config task should be replaceable.

eddiemonge avatar Jul 29 '14 07:07 eddiemonge

:+1:

SBoudrias avatar Jul 29 '14 07:07 SBoudrias

Actually I think this might be the default current behavior but maybe it shouldn't be and instead follow these rules:

  • Insert new config/target if it doesn't exist
  • Ignore config/target if it does exist
  • Add a flag to replace config/target if it does exist
  • Add a flag to merge config/target if specified

Maybe the method could prompt like the conflicter in yo-gen does if it does exist. Maybe have an option to always allow replace, merge, or ignore.

eddiemonge avatar Aug 04 '14 18:08 eddiemonge

Nice idea! What's the current status?

urecio avatar Dec 12 '15 09:12 urecio

need this :+1:

qiuzuhui avatar Feb 10 '16 15:02 qiuzuhui