Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Much better first for the stupid deps-first issue.

  • Loading branch information...
commit 76743a03efa94303e8bc2d561abec78bd3d03146 1 parent e2a7e16
@mde mde authored
Showing with 2 additions and 6 deletions.
  1. +2 −6 lib/jake.js
View
8 lib/jake.js
@@ -169,23 +169,19 @@ jake = new function () {
}
/**
* Parses all dependencies of a task (and their dependencies, etc.)
- * recursively, and prepends them to the _taskList queue, so dependencies
- * run first.
+ * recursively -- depth-first, so deps run first
* @param {String} name The name of the current task whose
* dependencies are being parsed.
*/
, _parseDeps = function (name) {
- _taskList.unshift(name);
var task = _this.getTask(name)
, deps = task.deps;
if (deps && _isArray(deps) && deps.length) {
- // Reverse the array so when items are prepended, the end up
- // in the same order as defined at a particular level
- deps.reverse();
for (var i = 0, ii = deps.length; i < ii; i++) {
_parseDeps(deps[i]);
}
}
+ _taskList.push(name);
};
// Public properties
Please sign in to comment.
Something went wrong with that request. Please try again.