gdm

grunt-data-merge

In Soviet Russia data merges you!

Showing:

Popularity

Downloads/wk

1

GitHub Stars

1

Maintenance

Last Commit

6yrs ago

Contributors

0

Package

Dependencies

3

Size (min+gzip)

0.4KB

License

Type Definitions

Tree-Shakeable

No?

Categories

Readme

grunt-data-merge v0.1.0 Build Status Coverage Status

Merge JSON/YAML data files.

Task takes multiple JSON and/or YAML files and writes merged result of all sources to the destination.

Getting Started

This plugin requires Grunt ~0.4.0

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-data-merge --save-dev

Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:

grunt.loadNpmTasks('grunt-data-merge');

This plugin was designed to work with Grunt 0.4.x. If you're still using grunt v0.3.x it's strongly recommended that you upgrade, but in case you can't please use v0.3.2.

data-merge task

Run this task with the grunt data-merge command.

Task targets, files and options may be specified according to the grunt Configuring tasks guide.

Options

space

Type: String | Number

Causes the resulting string to be pretty-printed.

Usage Examples

By order, extend common data by partials data, and partials data by pages data:

grunt.loadNpmTasks('grunt-data-merge');

grunt.initConfig({
  'data-merge': {
    options: {
      space: 2
    },

    build: {
      files: {
        'data/build/index.json': [
          'data/common.json',
          'data/build/partials.yml',
          'data/pages/index.yml'
        ]
      }
    }
});

Release History

  • 2014-12-02   v0.1.0   Initial release

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100