Skip to content

Instantly share code, notes, and snippets.

@fxbenard
Created January 4, 2014 16:38

Revisions

  1. fxbenard created this gist Jan 4, 2014.
    26 changes: 26 additions & 0 deletions Gruntfile.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,26 @@
    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']);

    };