Minifies blocks of JSON-like content into valid JSON by removing all whitespace and comments, using JSON.minify.
npm install gulp-jsonminify --save-dev
var jsonminify = require('gulp-jsonminify');
gulp.task('minify', function () {
return gulp.src(['path/to/files/*.json'])
.pipe(jsonminify())
.pipe(gulp.dest('dist'));
});
(MIT License)