node package manager
Love JavaScript? Your insights can make it even better. Take the 2017 JavaScript Ecosystem Survey »

gulp-jsonminify

gulp-jsonminify

Minifies blocks of JSON-like content into valid JSON by removing all whitespace and comments, using JSON.minify.

Installation

npm install gulp-jsonminify --save-dev

Usage

var jsonminify = require('gulp-jsonminify');
 
gulp.task('minify', function () {
    return gulp.src(['path/to/files/*.json'])
        .pipe(jsonminify())
        .pipe(gulp.dest('dist'));
});

LICENSE

(MIT License)