Ignore:
Timestamp:
03/14/14 12:36:58 (11 years ago)
Author:
hendrikvanantwerpen
Message:

Enable deployment with Grunt.

Location:
Dev/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • Dev/trunk

    • Property svn:ignore
      •  

        old new  
        11build
        2 quod-erat.git
  • Dev/trunk/node_modules/grunt/lib/util/task.js

    r484 r516  
    33 * http://gruntjs.com/
    44 *
    5  * Copyright (c) 2013 "Cowboy" Ben Alman
     5 * Copyright (c) 2014 "Cowboy" Ben Alman
    66 * Licensed under the MIT license.
    77 * https://github.com/gruntjs/grunt/blob/master/LICENSE-MIT
     
    9090  // easier to implement than some kind of in-task "super" functionality.
    9191  Task.prototype.renameTask = function(oldname, newname) {
     92    if (!this._tasks[oldname]) {
     93      throw new Error('Cannot rename missing "' + oldname + '" task.');
     94    }
    9295    // Rename task.
    9396    this._tasks[newname] = this._tasks[oldname];
     
    186189
    187190  // Run a task function, handling this.async / return value.
    188   Task.prototype.runTaskFn = function(context, fn, done) {
     191  Task.prototype.runTaskFn = function(context, fn, done, asyncDone) {
    189192    // Async flag.
    190193    var async = false;
     
    213216        this._options.error.call({name: context.name, nameArgs: context.nameArgs}, err);
    214217      }
    215       done(err, success);
     218      // only call done async if explicitly requested to
     219      // see: https://github.com/gruntjs/grunt/pull/1026
     220      if (asyncDone) {
     221        process.nextTick(function () {
     222          done(err, success);
     223        });
     224      } else {
     225        done(err, success);
     226      }
    216227    }.bind(this);
    217228
     
    244255
    245256  // Begin task queue processing. Ie. run all tasks.
    246   Task.prototype.start = function() {
     257  Task.prototype.start = function(opts) {
     258    if (!opts) {
     259      opts = {};
     260    }
    247261    // Abort if already running.
    248262    if (this._running) { return false; }
     
    281295      this.runTaskFn(context, function() {
    282296        return thing.task.fn.apply(this, this.args);
    283       }, nextTask);
     297      }, nextTask, !!opts.asyncDone);
    284298
    285299    }.bind(this);
Note: See TracChangeset for help on using the changeset viewer.