mirror of
https://github.com/nodejs/node-v0.x-archive.git
synced 2026-04-28 03:01:10 -04:00
Add require.async().
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user