gulp-json2cson
Gulp plugin to parse JSON to CSON.
Last updated 2 years ago by illuminator .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install gulp-json2cson 
SYNC missed versions from official npm registry.

gulp-json2cson

GitHub license npm npm Travis

Gulp plugin to parse JSON to CSON with bevry/cson.

If you want to parse CSON to JSON, use gulp-cson.

Installation

NPM

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.

Current Tags

  • 2.0.0                                ...           latest (2 years ago)

3 Versions

  • 2.0.0                                ...           2 years ago
  • 1.0.1                                ...           4 years ago
  • 1.0.0                                ...           4 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 3
Dependencies (5)
Dev Dependencies (9)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |