firstandthird / load-grunt-config

Grunt plugin that lets you break up your Gruntfile config by task
firstandthird.github.io/load-grunt-config/
MIT License
374 stars 64 forks source link

use merge so empty objects don't kill settings #14

Closed dylang closed 11 years ago

dylang commented 11 years ago

Switched from extend to merge so that a config file can have defaults and the passed in config variable can overright any defaults without requring every property to be set.

Hypothetical pseudocode example:

jshint.json:

jshint: {
   // all these settings
}

and

config option

{
  jshint: {
    // i just want to overwrite one option, not replace the whole object.
  }
}
jgallen23 commented 11 years ago

looks great. Can you add a test for it?

dylang commented 11 years ago

I added an assert that fails when extend is used instead of merge.

jgallen23 commented 11 years ago

thanks

jgallen23 commented 11 years ago

npm published 0.6.1 which contains this

dylang commented 11 years ago

Thanks, works great!