mirror of https://github.com/nodejs/node.git
Fix #169. Expose require members in the repl.
This fixes #169 by putting the require members onto the cwdRequire function which is exposed to the repl scope.pull/5370/head
parent
431e72cbe8
commit
e65e6039a8
|
@ -24,6 +24,9 @@ function cwdRequire (id) {
|
||||||
}
|
}
|
||||||
return require(id);
|
return require(id);
|
||||||
}
|
}
|
||||||
|
Object.keys(require).forEach(function (k) {
|
||||||
|
cwdRequire[k] = require[k];
|
||||||
|
});
|
||||||
|
|
||||||
function setScope (self) {
|
function setScope (self) {
|
||||||
scope = {};
|
scope = {};
|
||||||
|
|
Loading…
Reference in New Issue