Exposed require to ejs pages!

This commit is contained in:
Egil Moeller 2012-03-22 18:34:38 +01:00
parent 5261ba5a69
commit b8a4333d1b
1 changed files with 1 additions and 0 deletions

View File

@ -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: []});