https://github.com/dragory/gulp-json-format
A gulp plugin to parse and format JSON in files.
https://github.com/dragory/gulp-json-format
Last synced: 10 months ago
JSON representation
A gulp plugin to parse and format JSON in files.
- Host: GitHub
- URL: https://github.com/dragory/gulp-json-format
- Owner: Dragory
- License: mit
- Created: 2014-07-05T17:07:39.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2023-04-15T20:52:04.000Z (about 3 years ago)
- Last Synced: 2025-08-12T23:58:32.163Z (10 months ago)
- Language: JavaScript
- Size: 34.2 KB
- Stars: 1
- Watchers: 1
- Forks: 2
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# gulp-json-format [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url]
> A [gulp](https://github.com/gulpjs/gulp) plugin to parse and format JSON in files.
## Usage
First, install `gulp-json-format` as a development dependency:
```
npm install gulp-json-format --save-dev
```
Then, add it to your `gulpfile.js`:
```javascript
var jsonFormat = require('gulp-json-format');
gulp.src('manifest.json')
.pipe(jsonFormat(4))
.pipe(gulp.dest('.'));
```
## API
### jsonFormat([space])
#### space
Type: `Number` or `String`
See the space parameter for [JSON.stringify() on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify).
[npm-url]: https://www.npmjs.org/package/gulp-json-format
[npm-image]: https://badge.fury.io/js/gulp-json-format.svg
[travis-url]: https://travis-ci.org/Dragory/gulp-json-format
[travis-image]: https://api.travis-ci.org/Dragory/gulp-json-format.svg