Skip to content

Instantly share code, notes, and snippets.

@fxbenard
Created January 4, 2014 16:38
Show Gist options
  • Save fxbenard/8257166 to your computer and use it in GitHub Desktop.
Save fxbenard/8257166 to your computer and use it in GitHub Desktop.
Transifex integration into my Gruntfile.js
var shell = require('shelljs');
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
po2mo: {
files: {
src: 'lang/*.po',
expand: true,
},
},
});
grunt.loadNpmTasks('grunt-po2mo');
grunt.registerTask('i18n', "Update languages", function() {
shell.exec('tx pull -a');
shell.exec('grunt po2mo');
});
// Default task(s).
grunt.registerTask('default', ['po2mo']);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment