tasks/batch_git_clone.js
function cloneRepo(item){

      var deferred = Q.defer();
      var repoURL = item.repo;
      var path = item.path;

      deleteOldFiles(path).
      then(function(){
        return performCmd(repoURL, path);
      }).then(function(success){
        return npmInstall(path, success);
      }).then(function(success){
        return bowerInstall(path, success);
      }).then(function(){
        deferred.resolve();
      });

      return deferred.promise;

    }
function cloneRepo(item){

      var deferred = Q.defer();
      var repoURL = item.repo;
      var path = item.path;

      deleteOldFiles(path).
      then(function(){
        return performCmd(repoURL, path);
      }).then(function(success){
        return npmInstall(path, success);
      }).then(function(success){
        return bowerInstall(path, success);
      }).then(function(){
        deferred.resolve();
      });

      return deferred.promise;

    }
function cloneRepo ( item ) { var deferred = Q . defer ( ) ; var repoURL = item . repo ; var path = item . path ; deleteOldFiles ( path ) . then ( function ( ) { return performCmd ( repoURL , path ) ; } ) . then ( function ( success ) { return npmInstall ( path , success ) ; } ) . then ( function ( success ) { return bowerInstall ( path , success ) ; } ) . then ( function ( ) { deferred . resolve ( ) ; } ) ; return deferred . promise ; }
creates a spawn process and clones the repos
creates a spawn process and clones the repos