lib/patsy.js
function(how){

      var _child, _cfg, patsy = this;
      var _execCmd = [];

      if(typeof this.project_cfg.project === 'undefined'){
        /**
         * Require config from the library
         *
         * @var     Object
         * @source  patsy
         */
        var config      = require('./config')({
          app_path  : opts.app_path,
          verbose   : opts.verbose,
          project_path : ''
        });
        this.project_cfg = config.load();
      }

      process.chdir(this.project_cfg.project.environment.abs_path);

      _cfg = this.project_cfg || this.config.load();

      process.chdir(opts.app_path);

      if(patsy.utils.isWin){

        _execCmd.push('cmd');
        // New args will go to cmd.exe, then we append the args passed in to the list
        // the /c part tells it to run the command.  Thanks, Windows...
        _execCmd.push('/c');
        _execCmd.push('node_modules\\.bin\\grunt');

      } else {

        _execCmd.push('node_modules/.bin/grunt');

      }

      // Append needed arguments for grunt
      _execCmd.push('--path');
      _execCmd.push(_cfg.project.environment.abs_path);
      _execCmd.push(opts.verbose ? '-v' : '');
      _execCmd.push(opts.force ? '--force' : '');
      _execCmd.push(how);


      _child = exec(_execCmd.join(' '),
        function (error, stdout, stderr) {

          util.print(stdout);

          if(stderr){

            console.log(stderr);

          }

          if (error !== null) {

            patsy.scripture.print('\n[Patsy]'.yellow + ': The grunt died!');

            if(opts.verbose){

              console.log('>> ERROR'.red + ':' , error);

            }

            process.exit(1);

          }


      });
    }
function(how){

      var _child, _cfg, patsy = this;
      var _execCmd = [];

      if(typeof this.project_cfg.project === 'undefined'){
        /**
         * Require config from the library
         *
         * @var     Object
         * @source  patsy
         */
        var config      = require('./config')({
          app_path  : opts.app_path,
          verbose   : opts.verbose,
          project_path : ''
        });
        this.project_cfg = config.load();
      }

      process.chdir(this.project_cfg.project.environment.abs_path);

      _cfg = this.project_cfg || this.config.load();

      process.chdir(opts.app_path);

      if(patsy.utils.isWin){

        _execCmd.push('cmd');
        // New args will go to cmd.exe, then we append the args passed in to the list
        // the /c part tells it to run the command.  Thanks, Windows...
        _execCmd.push('/c');
        _execCmd.push('node_modules\\.bin\\grunt');

      } else {

        _execCmd.push('node_modules/.bin/grunt');

      }

      // Append needed arguments for grunt
      _execCmd.push('--path');
      _execCmd.push(_cfg.project.environment.abs_path);
      _execCmd.push(opts.verbose ? '-v' : '');
      _execCmd.push(opts.force ? '--force' : '');
      _execCmd.push(how);


      _child = exec(_execCmd.join(' '),
        function (error, stdout, stderr) {

          util.print(stdout);

          if(stderr){

            console.log(stderr);

          }

          if (error !== null) {

            patsy.scripture.print('\n[Patsy]'.yellow + ': The grunt died!');

            if(opts.verbose){

              console.log('>> ERROR'.red + ':' , error);

            }

            process.exit(1);

          }


      });
    }
function ( how ) { var _child , _cfg , patsy = this ; var _execCmd = [ ] ; if ( typeof this . project_cfg . project === 'undefined' ) { /**
         * Require config from the library
         *
         * @var     Object
         * @source  patsy
         */ var config = require ( './config' ) ( { app_path : opts . app_path , verbose : opts . verbose , project_path : '' } ) ; this . project_cfg = config . load ( ) ; } process . chdir ( this . project_cfg . project . environment . abs_path ) ; _cfg = this . project_cfg || this . config . load ( ) ; process . chdir ( opts . app_path ) ; if ( patsy . utils . isWin ) { _execCmd . push ( 'cmd' ) ; // New args will go to cmd.exe, then we append the args passed in to the list // the /c part tells it to run the command.  Thanks, Windows... _execCmd . push ( '/c' ) ; _execCmd . push ( 'node_modules\\.bin\\grunt' ) ; } else { _execCmd . push ( 'node_modules/.bin/grunt' ) ; } // Append needed arguments for grunt _execCmd . push ( '--path' ) ; _execCmd . push ( _cfg . project . environment . abs_path ) ; _execCmd . push ( opts . verbose ? '-v' : '' ) ; _execCmd . push ( opts . force ? '--force' : '' ) ; _execCmd . push ( how ) ; _child = exec ( _execCmd . join ( ' ' ) , function ( error , stdout , stderr ) { util . print ( stdout ) ; if ( stderr ) { console . log ( stderr ) ; } if ( error !== null ) { patsy . scripture . print ( '\n[Patsy]' . yellow + ': The grunt died!' ) ; if ( opts . verbose ) { console . log ( '>> ERROR' . red + ':' , error ) ; } process . exit ( 1 ) ; } } ) ; }
Runs grunt tasks

@param   String  how
Runs grunt tasks