1.0.3 • Published 7 years ago
grunt-merge-with-master v1.0.3
grunt-merge-with-master 1.0.3
Merge JSON files with master file
Getting Started
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-merge-with-master --save-dev
Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
grunt.loadNpmTasks('grunt-merge-with-master');
Merge task
Run this task with the grunt mergeMaster
command.
Task targets, files and options may be specified according to the grunt Configuring tasks guide.
Options
master
Type: string
Default:
Path to master json file
Usage examples
Basic compression
This configuration will compress and mangle the input files using the default options.
// Project configuration.
grunt.initConfig({
masterMerge: {
merge: {
files: [
{
expand: true,
cwd: './documentation/src/',
src: ['**/*.json', '!api.json'],
dest: './documentation/dest/',
master: './documentation/src/api.json',
},
],
},
},
});