grunt-concat-i18n

0.3.3 • Public • Published

grunt-concat-18n

A Grunt task for concatenating i18n files and generating a JavaSript friendly version of the result.

Getting Started

This plugin requires Grunt >=1.5.3

If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:

npm install grunt-concat-i18n --save-dev

Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:

grunt.loadNpmTasks('grunt-concat-i18n');

Usage

require('load-grunt-tasks')(grunt); // npm install --save-dev load-grunt-tasks

grunt.initConfig({
    'translations': {
         frontend: {
           dest: 'public/gen/js',
           languages: ['', 'de_DE', 'es_ES', 'fr_FR', 'nl_NL'],
           src: ['path/to/properties', 'other/path/to/properties'],
           scope: 'My.own.JS.scope',
           propertiesDest: 'public/gen/properties',
         }
    }
});

grunt.registerTask('default', ['translations']);

Required Options

dest

Type: String

The final destination for the JavaScript files

languages

Type: Array

The list of language codes.

src

Type Array

The list of properties bundle names without language codes and file endings

scope

Type String

The scope on which the generated JS files will be put. For use with for example localized-string enter module.exports

propertiesDest

Type: String

Default: Temporary directory`

Specified the output directory for the intermediate, concatenated, properties file

Package Sidebar

Install

npm i grunt-concat-i18n

Weekly Downloads

546

Version

0.3.3

License

MIT

Unpacked Size

154 kB

Total Files

6

Last publish

Collaborators

  • hassanaziz
  • paavopeltonenrefined
  • 92alejandrogarcia
  • alexhoeing
  • xcfe
  • zalharash
  • jani.niemitalo
  • kvacke
  • yaldarhapak
  • saqibrefined
  • misan-george
  • daniel.kloek
  • ipmoreira
  • anderefined
  • sarkar.subramanian
  • nuno.santos
  • anttipeltola
  • villetampiolestrade
  • dekis
  • martinpedersen
  • emilsjodin
  • rw_bamboo
  • jenny.adeholt
  • juliarefinedwiki
  • jhagerlund
  • emilpedersen
  • kardee13
  • erkki
  • ellakallman
  • miikamakiniemi
  • richardsimko