https://github.com/doowb/gulp-convert
Gulp plugin to convert to or from JSON, YAML, XML, PLIST or CSV.
https://github.com/doowb/gulp-convert
Last synced: over 1 year ago
JSON representation
Gulp plugin to convert to or from JSON, YAML, XML, PLIST or CSV.
- Host: GitHub
- URL: https://github.com/doowb/gulp-convert
- Owner: doowb
- License: mit
- Created: 2013-12-23T12:43:13.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2015-02-20T17:49:28.000Z (over 11 years ago)
- Last Synced: 2025-02-25T17:18:43.482Z (over 1 year ago)
- Language: JavaScript
- Size: 161 KB
- Stars: 16
- Watchers: 7
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gulp-convert [![NPM version][npm-image]][npm-url] [![Build status][build-image]][build-url]
## Work In Progress
This plugin is not completely ready yet.
## Usage
First, install `gulp-convert` as a development dependency:
```shell
npm install --save-dev gulp-convert
```
Then, add it to your `gulpfile.js`:
```javascript
var convert = require('gulp-convert');
gulp.task('csv2json', function(){
gulp.src(['data/csv/*.csv'])
.pipe(convert({
from: 'csv',
to: 'json'
}))
.pipe(gulp.dest('data/json/'));
});
```
## API
### convert(options)
#### options.from
Type: `String`
Default: `csv`
File type converting from.
#### options.to
Type: `String`
Default: `json`
File type converting to.
[build-url]: https://github.com/assemble/gulp-convert
[build-image]: https://github.com/assemble/gulp-convert.png
[npm-url]: https://npmjs.org/package/gulp-convert
[npm-image]: https://badge.fury.io/js/gulp-convert.png