New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

gulp-json-concat

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gulp-json-concat

⚡️ Combine several JSON files into one with Gulp

  • 0.2.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.9K
decreased by-0.1%
Maintainers
1
Weekly downloads
 
Created
Source

gulp-json-concat

Build Status Coverage Status Dependencies Known Vulnerabilities npm module downloads per month

Combine several JSON files with Gulp

gulp-json-concat is a fork of gulp-jsoncombine with new few options.

Install

NPM

$ npm install --save-dev gulp-json-concat

Usage

You can combine json files that are in subfolders. The json generated will remove the name of these folders to keep only the name of the file.

var gulp = require('gulp');
var jsonConcat = require('gulp-json-concat');

gulp.task('json', function () {
  return gulp.src('db/**/*.json')
    .pipe(jsonConcat('db.json',function(data){
      return new Buffer(JSON.stringify(data));
    }))
    .pipe(gulp.dest('dist/json'));
});

API

jsonConcat(fileName, processor)

fileName

Type: String

The output filename.

processor

Type: Function

The function that will be called with the dictionary containing all the data from the processes JSON files, where the keys of the dictionary, would be the names of the files (sans the '.json' postfix).

The function should return a new Buffer that would be writter to the output file.

Changelog

0.2.0 Update

  • Update dependencies

0.1.1 Update and corrections

  • Update dependencies
  • Fix relative path + filename on macOs (thanks to @cmandlbaur)
  • Update travis.yml, editorconfig and package.json
  • Add new badges (Coveralls, Snyk)

0.0.4 Add jsonlint

  • Analyse json files and show exactly wehre is the error

0.0.1 Initial release

  • initial code

License

MIT © 2017 David Dias

Keywords

FAQs

Package last updated on 09 Jan 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc