Browse Source

Add require.async().

v0.7.4-release
Ryan Dahl 15 years ago
parent
commit
78f8b6771c
  1. 2
      src/node.js

2
src/node.js

@ -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);

Loading…
Cancel
Save