gulp-translation2json

1.1.0 • Public • Published

gulp-translation2json

Gulp plugin to convert CSV translation files to JSON using the csv package.

Installation

Install with npm:

npm install --save-dev gulp-translation2json

Usage

var gulp = require('gulp');
var translation2json = require('gulp-translation2json');

gulp.task('translate', function () {
  gulp.src('translations/**/*.csv')
    .pipe(translation2json())
    .pipe(gulp.dest('dist'));
});

Options

The plugin passes all options on to the csv parser. For a full list of options see the csv docs.

Extra options for the translation2json plugin:

  • keysColumn

    Set the column index for the translation keys. Default value: 0.

  • valuesColumn

    Set the column index for the translation values. Default value: 1.

  • indent

    Set the indentation used for pretty printing. Set to null for no pretty printing. Default: (2 spaces).

Thanks to

gulp-csv2json

Contibutors

License

MIT @smuldr

Package Sidebar

Install

npm i gulp-translation2json

Weekly Downloads

5

Version

1.1.0

License

MIT

Last publish

Collaborators

  • smuldr