gulp-combine-json
v1.0.3
Published
A plugin for Gulp to combine several JSON files
Downloads
8
Readme
gulp-concat-json
A plugin for Gulp to combine several JSON files
Usage
First, install gulp-combine-json
as a development dependency:
npm install --save-dev gulp-concat-json
Then, add it to your gulpfile.js
:
var concat_json = require("gulp-combine-json");
gulp.src("api/project/*.json")
.pipe(concat_json("project.js"))
.pipe(gulp.dest("dist/api"));
API
Input json files
file1.json
[
{
"name": "Adam",
"age": "1",
"gender": "male"
}
]
file2.json
[
{
"name": "Eve",
"age": "1",
"gender": "female"
}
]
Output json file
[
{
"name": "Adam",
"age": "1",
"gender": "male"
},
{
"name": "Eve",
"age": "1",
"gender": "female"
}
]
concat-json(fileName, processor)
fileName
Type: String
The output filename