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