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

Enable deployment with Grunt.

Location:
Dev/trunk
Files:
1 deleted
13 edited

Legend:

Unmodified
Added
Removed
  • Dev/trunk

    • Property svn:ignore
      •  

        old new  
        11build
        2 quod-erat.git
  • Dev/trunk/node_modules/grunt/lib/grunt.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
     
    2323  return grunt[name] = require('./grunt/' + name);
    2424}
    25 var util = gRequire('util');
     25
     26var util = require('grunt-legacy-util');
     27grunt.util = util;
     28grunt.util.task = require('./util/task');
     29
    2630gRequire('template');
    2731gRequire('event');
     
    153157  // allows the error callback to execute multiple times.
    154158  tasks.forEach(function(name) { task.run(name); });
    155   task.start();
     159  // Run tasks async internally to reduce call-stack, per:
     160  // https://github.com/gruntjs/grunt/pull/1026
     161  task.start({asyncDone:true});
    156162};
  • Dev/trunk/node_modules/grunt/lib/grunt/cli.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
     
    2222  // CLI-parsed options override any passed-in "default" options.
    2323  if (options) {
    24     // For each defult option...
     24    // For each default option...
    2525    Object.keys(options).forEach(function(key) {
    2626      if (!(key in cli.options)) {
     
    6262    short: 'd',
    6363    info: 'Enable debugging mode for tasks that support it.',
    64     type: Number
     64    type: [Number, Boolean]
    6565  },
    6666  stack: {
  • Dev/trunk/node_modules/grunt/lib/grunt/config.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
  • Dev/trunk/node_modules/grunt/lib/grunt/event.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
  • Dev/trunk/node_modules/grunt/lib/grunt/fail.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
  • Dev/trunk/node_modules/grunt/lib/grunt/file.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
     
    134134var pathSeparatorRe = /[\/\\]/g;
    135135
     136// The "ext" option refers to either everything after the first dot (default)
     137// or everything after the last dot.
     138var extDotRe = {
     139  first: /(\.[^\/]*)?$/,
     140  last: /(\.[^\/\.]*)?$/,
     141};
     142
    136143// Build a multi task "files" object dynamically.
    137144file.expandMapping = function(patterns, destBase, options) {
    138145  options = grunt.util._.defaults({}, options, {
     146    extDot: 'first',
    139147    rename: function(destBase, destPath) {
    140148      return path.join(destBase || '', destPath);
     
    151159    }
    152160    // Change the extension?
    153     if (options.ext) {
    154       destPath = destPath.replace(/(\.[^\/]*)?$/, options.ext);
     161    if ('ext' in options) {
     162      destPath = destPath.replace(extDotRe[options.extDot], options.ext);
    155163    }
    156164    // Generate destination filename.
  • Dev/trunk/node_modules/grunt/lib/grunt/help.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
  • Dev/trunk/node_modules/grunt/lib/grunt/log.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
  • Dev/trunk/node_modules/grunt/lib/grunt/option.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
  • Dev/trunk/node_modules/grunt/lib/grunt/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
     
    108108      }
    109109    } else if (Array.isArray(data.files)) {
    110       data.files.forEach(function(obj) {
     110      grunt.util._.flatten(data.files).forEach(function(obj) {
    111111        var prop;
    112112        if ('src' in obj || 'dest' in obj) {
     
    245245      return options;
    246246    };
     247    // Expose the current target.
     248    this.target = target;
     249    // Recreate flags object so that the target isn't set as a flag.
     250    this.flags = {};
     251    this.args.forEach(function(arg) { this.flags[arg] = true; }, this);
    247252    // Expose data on `this` (as well as task.current).
    248253    this.data = grunt.config([name, target]);
     
    256261      }.bind(this)
    257262    });
    258     // Expose the current target.
    259     this.target = target;
    260     // Recreate flags object so that the target isn't set as a flag.
    261     this.flags = {};
    262     this.args.forEach(function(arg) { this.flags[arg] = true; }, this);
    263263    // Call original task function, passing in the target and any other args.
    264264    return fn.apply(this, this.args);
     
    278278// Override built-in renameTask to use the registry.
    279279task.renameTask = function(oldname, newname) {
    280   // Add and remove task.
    281   registry.untasks.push(oldname);
    282   registry.tasks.push(newname);
    283   // Actually rename task.
    284   return parent.renameTask.apply(task, arguments);
     280  var result;
     281  try {
     282    // Actually rename task.
     283    result = parent.renameTask.apply(task, arguments);
     284    // Add and remove task.
     285    registry.untasks.push(oldname);
     286    registry.tasks.push(newname);
     287    // Return result.
     288    return result;
     289  } catch(e) {
     290    grunt.log.error(e.message);
     291  }
    285292};
    286293
  • Dev/trunk/node_modules/grunt/lib/grunt/template.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
  • 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.