gulp-json2cson
v2.0.0
Published
Gulp plugin to parse JSON to CSON.
Downloads
21
Maintainers
Readme
gulp-json2cson
Gulp plugin to parse JSON to CSON with bevry/cson.
If you want to parse CSON to JSON, use gulp-cson.
Installation
Via npm:
npm install --save-dev gulp-json2cson
Via Yarn:
yarn add --dev gulp-json2cson
Usage
const gulp = require('gulp');
const json2cson = require('gulp-json2cson');
gulp.task('json2cson', () => {
return gulp.src('src/data.json')
.pipe(json2cson())
.pipe(gulp.dest('dest'));
});
API
json2cson(indent)
Parse JSON to CSON with desired indentation.
const gulp = require('gulp');
const json2cson = require('gulp-json2cson');
gulp.task('json2cson', () => {
return gulp.src('src/data.json')
.pipe(json2cson('\t'))
.pipe(gulp.dest('dest'));
});
indent
Type: String
Default:
(2 spaces)
Indentation characters.