Skip to content

Instantly share code, notes, and snippets.

@bjornharrtell
Created January 25, 2013 18:26
Show Gist options
  • Save bjornharrtell/4636693 to your computer and use it in GitHub Desktop.
Save bjornharrtell/4636693 to your computer and use it in GitHub Desktop.
Using files in this gist as input to jsbuild will result in dependency order test.js, One.js, Two.js which will fail since Two.js is needed when defining One.js. The circular dependency is silly but valid.... Two.js should have higher precedence than One.js when ordering because it is used as a base class, Two.js only needs One.js when invoking …
[test.js]
root = src
first =
test.js
/*
* @requires two/Two.js
*/
function One() { }
Two.prototype = new Two();
// intentionally empty
/*
* @requires one/One.js
*/
function Two() { }
Two.prototype.makeOne = function() { return new One(); }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment