node package manager


grunt-contrib-commands Build Status

Easy way to run shell commands, batch files or executable files in grunt.

Getting Started

This plugin requires Grunt ~0.4.0

If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:

npm install grunt-contrib-commands --save-dev

Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:


This plugin was designed to work with Grunt 0.4.x. If you're still using grunt v0.3.x it's strongly recommended that you upgrade.

Command task

Run this task with the grunt command command.

Task targets, options may be specified according to the grunt Configuring tasks guide.



Type: Boolean Default: true

This overrides grunt.file.delete from blocking deletion of folders outside current working dir (CWD). Use with caution.

Usage Examples

    // this task 
    command : {
        run_shell: {
            type : 'shell',
            cmd  : './'
        run_bat: {
            type : 'bat',
            cmd  : 'test.bat'
        run_cmd: {
            cmd: ['mkdir __tmp__cmd', 'mkdir __tmp__' + osType]

Release History

  • 2013-07-19 v0.1.0 Refactored from grunt-contrib into individual repo.

Task submitted by Colin Luo

This file was generated on Fri Jul 19 2013 0:29:15.