This plugin requires Grunt
If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:
npm install grunt-extend --save-dev
_.merge() internally. Once the final object
is created, the resulting object is written to a new JSON file.
Possible uses include:
In your project's Gruntfile, add a section named
extend to the data object passed into
options.defaults as a property of the task will make all of the targets share
the same default options. Setting
options.defaults inside a target will override
the task's default options for that target.
The basic usage example is using an empty object as the default options and write it to a JSON file:
This example uses the default options specified in
options.defaults and writes
them to a JSON file:
It is possible to extend the default options with one or more JSON files, and write the results to a new JSON file:
Extend is a mult-task, so you can specify multiple targets. Default options can be overridden in individual targets:
It is also possible to generate multiple files using a single target:
In order to extend and object deeply, add
deep to the targets options:
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using Grunt.