Exposed require to ejs pages!
parent
5261ba5a69
commit
b8a4333d1b
|
@ -100,6 +100,7 @@ exports.require = function (name, args) {
|
|||
var ejspath = require.resolve(name)
|
||||
|
||||
args.e = exports;
|
||||
args.require = require;
|
||||
var template = '<% e._init(buf); %>' + fs.readFileSync(ejspath).toString() + '<% e._exit(); %>';
|
||||
|
||||
exports.info.file_stack.push({path: ejspath, inherit: []});
|
||||
|
|
Loading…
Reference in New Issue