1.0.3 • Published 6 years ago

gulp-combine-json v1.0.3

Weekly downloads
24
License
MIT
Repository
github
Last release
6 years ago

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

1.0.3

6 years ago

1.0.2

7 years ago

1.0.1

7 years ago