Skip to content

Commit

Permalink
Add require.async().
Browse files Browse the repository at this point in the history
  • Loading branch information
ry committed Oct 5, 2009
1 parent d703813 commit 78f8b67
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/node.js
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,8 @@ node.Module.prototype.loadScript = function (loadPromise) {
return requireAsync(url).wait();
}

require.async = requireAsync;

// create wrapper function
var wrapper = "function (__filename, exports, require) { " + content + "\n};";
var compiled_wrapper = node.compile(wrapper, self.filename);
Expand Down

0 comments on commit 78f8b67

Please sign in to comment.