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.
This commit is contained in:
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…
x
Reference in New Issue
Block a user