gulp-convert
Version:
Gulp plugin to convert to or from JSON, YAML, XML, PLIST or CSV.
48 lines (34 loc) • 946 B
Markdown
This plugin is not completely ready yet.
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/'));
});
```
Type: `String`
Default: `csv`
File type converting from.
Type: `String`
Default: `json`
File type converting to.
[]: https://github.com/assemble/gulp-convert
[]: https://github.com/assemble/gulp-convert.png
[]: https://npmjs.org/package/gulp-convert
[]: https://badge.fury.io/js/gulp-convert.png