A library and tool to apply localization to dust templates before rendering
JavaScript
Clone or download
gabrielcsapo Merge pull request #21 from gabrielcsapo/v1.x
updates LICENSE.txt, adds versions of node to test, removes maintainer
Latest commit 6a42fb0 Jul 14, 2017
Permalink
Failed to load latest commit information.
lib
test
.gitignore
.jshintrc
.npmignore Update npmignore. Mar 27, 2014
.travis.yml
CONTRIBUTING.md
LICENSE.txt
README.md
SECURITY.md
index.js
localizr.js
package.json

README.md

localizr

Build Status

A library and tool to apply localization to dust templates before rendering.

It applies the contents of 'content bundles' to {@pre} tags in dust templates, as first described in Makara's README

Use

$ npm install -g localizr
$ localizr --props=content/index.properties --out=templates/out templates/index.dust
var fs = require('fs'),
    localizr = require('localizr');

var out, options;

out = path.join(__dirname, 'templates', 'out', 'index.dust');
options = {
  src: path.join(__dirname, 'templates', 'index.dust'),
  props: path.join(__dirname, 'content', 'index.properties')
};

localizr.createReadStream(options).pipe(fs.createWriteStream(out));