jsxgettext-recursive

Recursively search and extract gettext strings

jsxgettext-recursive

Recursively search and extract gettext strings.

npm install jsxgettext-recursive
var extract = require('jsxgettext-recursive');
 
 
var walker = extract({
  'input-dir': './app/scripts',
  'output-dir': './locales',
  output: 'client.pot',
  exclude: /dist/,
  'join-existing': false,
  keyword: 't',
  parsers: {
    '.js': 'javascript',
    '.mustache': 'handlebars'
  }
});
 
walker.on('end', function() {
  console.log('done!');
});

Possible parsers include: javascript, handlebars, jade, ejs, jinja.