added grunt task to transifex pulling and improved the registered tasks

This commit is contained in:
claudiosmweb 2014-02-02 18:08:35 -02:00
parent 6a2f8ef3c4
commit ddf6f7bd41
1 changed files with 23 additions and 4 deletions

View File

@ -44,14 +44,25 @@ module.exports = function( grunt ){
},
shell: {
txpull: {
options: {
stdout: true
},
command: [
'cd i18n',
'tx pull -a -f',
].join( '&&' )
},
generatemos: {
options: {
stdout: true
},
command: [
'cd i18n/languages',
'for i in *.po; do msgfmt $i -o ${i%%.*}.mo; done',
'ls'
].join( '&&' )
}
},
}
});
@ -61,7 +72,15 @@ module.exports = function( grunt ){
grunt.loadNpmTasks( 'grunt-contrib-cssmin' );
// Register tasks
grunt.registerTask( 'default', []);
grunt.registerTask( 'dev', ['less:compile', 'cssmin', 'shell:generatemos' ] );
grunt.registerTask( 'default', [
'less',
'cssmin',
]);
grunt.registerTask( 'dev', [
'default',
'shell:txpull',
'shell:generatemos'
]);
};