Skip to content

Commit

Permalink
Grunt shell task
Browse files Browse the repository at this point in the history
  • Loading branch information
mikejolley committed Jan 30, 2014
1 parent a6aac5e commit efc2fa1
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
13 changes: 12 additions & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,25 @@ module.exports = function(grunt){
"assets/css/woocommerce.css": ["assets/css/woocommerce.css"]
},

shell: {
generatemos: {
command: [
'cd i18n/languages',
'for i in *.po; do msgfmt $i -o ${i%%.*}.mo; done',
'ls'
].join('&&')
}
},

});

// Load NPM tasks to be used here
grunt.loadNpmTasks('grunt-shell');
grunt.loadNpmTasks("grunt-contrib-less");
grunt.loadNpmTasks("grunt-contrib-cssmin");

// Register tasks
grunt.registerTask( 'default', []);
grunt.registerTask( 'dev', ["less:compile", "cssmin"]);
grunt.registerTask( 'dev', ["less:compile", "cssmin", "shell:generatemos" ] );

};
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"grunt": "~0.4.2",
"grunt-contrib-uglify": "~0.2.2",
"grunt-contrib-less": "~0.9.0",
"grunt-contrib-cssmin": "~0.7.0"
"grunt-contrib-cssmin": "~0.7.0",
"grunt-shell": "~0.6.4"
}
}

0 comments on commit efc2fa1

Please sign in to comment.