Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/t2ym/gulp-i18n-add-locales
Add placeholder JSON files for target locales for i18n-behavior
https://github.com/t2ym/gulp-i18n-add-locales
Last synced: 22 days ago
JSON representation
Add placeholder JSON files for target locales for i18n-behavior
- Host: GitHub
- URL: https://github.com/t2ym/gulp-i18n-add-locales
- Owner: t2ym
- License: other
- Created: 2016-02-04T08:20:41.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2016-10-03T14:02:28.000Z (about 8 years ago)
- Last Synced: 2024-08-09T15:31:41.326Z (3 months ago)
- Language: JavaScript
- Size: 6.84 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# gulp-i18n-add-locales
Add placeholder JSON files for target locales for [i18n-behavior](https://github.com/t2ym/i18n-behavior)
Project template available at [polymer-starter-kit-i18n](https://github.com/t2ym/polymer-starter-kit-i18n). On Github Pages (https://t2ym.github.io/polymer-starter-kit-i18n)
## Features
- Add placeholder empty JSON files in locales folder for the target custom element
- `` is searched for id
- `` is searched for id## Install
```
npm install --save-dev gulp-i18n-add-locales
```## Usage
```javascript
var gutil = require('gulp-util');
var grepContents = require('gulp-grep-contents');
var size = require('gulp-size');
var i18nAddLocales = require('gulp-i18n-add-locales');var config = {
// list of target locales to add
locales: gutil.env.targets ? gutil.env.targets.split(/ /) : []
}// Add locales to I18N-ready elements and pages
gulp.task('locales', function() {
var elements = gulp.src([ 'app/elements/**/*.html' ], { base: 'app' })
.pipe(grepContents(/i18n-behavior.html/))
.pipe(grepContents(/