0.1.2 • Published 5 years ago

gulp-plntr-locale v0.1.2

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

gulp-plntr-locale NPM version Build Status

gulp-plntr-locale is a Gulp plugin that converts YAML localization files to Planitar angular Locale services. Gulp is a streaming build system utilizing node.js.

Install

npm install --save-dev gulp-plntr-locale

Usage

var plntrLocale = require('gulp-plntr-locale');

gulp.src('./src/**/*.yaml')
  .pipe(plntrLocale())
  .pipe(gulp.dest('./dist/'))

API

plntrLocale(options)

options.moduleName

Type: String Default: 'app.i18n'

i18n module name.

options.extractLanguage

Type: function|RegExp Default: /[^_]*(?=\.[^.]*$)/ (E.g. extracts en from text_en.yaml)

A regular expression or a function that returns the processed file's language according to its file path.