https://github.com/gluons/gulp-json2cson
Gulp plugin to parse JSON to CSON
https://github.com/gluons/gulp-json2cson
coffee-script coffeescript cson gulp gulp-plugin gulpplugin json
Last synced: about 1 month ago
JSON representation
Gulp plugin to parse JSON to CSON
- Host: GitHub
- URL: https://github.com/gluons/gulp-json2cson
- Owner: gluons
- License: mit
- Created: 2016-04-01T07:59:05.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2020-07-17T13:33:04.000Z (almost 6 years ago)
- Last Synced: 2025-02-15T18:24:31.569Z (over 1 year ago)
- Topics: coffee-script, coffeescript, cson, gulp, gulp-plugin, gulpplugin, json
- Language: CoffeeScript
- Homepage:
- Size: 46.9 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gulp-json2cson
[]()
[](https://www.npmjs.com/package/gulp-json2cson)
[](https://www.npmjs.com/package/gulp-json2cson)
[](https://travis-ci.org/gluons/gulp-json2cson)
[Gulp](http://gulpjs.com/) plugin to parse JSON to CSON with [bevry/cson](https://github.com/bevry/cson).
If you want to parse CSON to JSON, use [gulp-cson](https://github.com/stevelacy/gulp-cson).
## Installation
[](https://www.npmjs.com/package/gulp-json2cson)
**Via [npm](https://www.npmjs.com/):**
```
npm install --save-dev gulp-json2cson
```
**Via [Yarn](https://yarnpkg.com/):**
```
yarn add --dev gulp-json2cson
```
## Usage
```javascript
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.
```javascript
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.