mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-02-01 03:12:42 +01:00
Exposed require to ejs pages!
This commit is contained in:
parent
5261ba5a69
commit
b8a4333d1b
1 changed files with 1 additions and 0 deletions
|
@ -100,6 +100,7 @@ exports.require = function (name, args) {
|
||||||
var ejspath = require.resolve(name)
|
var ejspath = require.resolve(name)
|
||||||
|
|
||||||
args.e = exports;
|
args.e = exports;
|
||||||
|
args.require = require;
|
||||||
var template = '<% e._init(buf); %>' + fs.readFileSync(ejspath).toString() + '<% e._exit(); %>';
|
var template = '<% e._init(buf); %>' + fs.readFileSync(ejspath).toString() + '<% e._exit(); %>';
|
||||||
|
|
||||||
exports.info.file_stack.push({path: ejspath, inherit: []});
|
exports.info.file_stack.push({path: ejspath, inherit: []});
|
||||||
|
|
Loading…
Reference in a new issue