mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-23 00:46:16 -04:00
Client side / server side require
This commit is contained in:
parent
261bbd460f
commit
2a58a62dcc
7 changed files with 59 additions and 9 deletions
|
@ -7,6 +7,9 @@ exports.morehook = function (hook_name, args, cb) {
|
|||
}
|
||||
|
||||
exports.expressServer = function (hook_name, args, cb) {
|
||||
test = ep_client_require("/plugins/pluginomatic_fintest/test.js");
|
||||
console.log("FOOO:", test.foo);
|
||||
|
||||
args.app.get('/otherpart', function(req, res) {
|
||||
res.send("<em>Abra cadabra</em>");
|
||||
});
|
||||
|
|
|
@ -4,6 +4,6 @@
|
|||
"version": "0.0.1",
|
||||
"author": "RedHog (Egil Moeller) <egil.moller@freecode.no>",
|
||||
"contributors": [],
|
||||
"dependencies": {},
|
||||
"dependencies": {"etherpad-lite": "1"},
|
||||
"engines": { "node": ">= 0.4.1 < 0.7.0" }
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
"hooks": {
|
||||
"somehookname": "pluginomatic_fintest/otherpart:somehook",
|
||||
"morehook": "pluginomatic_fintest/otherpart:morehook",
|
||||
"expressServer": "pluginomatic_fintest/otherpart:expressServer"
|
||||
"expressCreateServer": "pluginomatic_fintest/otherpart:expressServer"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
|
1
available_plugins/pluginomatic_fintest/static/js/test.js
Normal file
1
available_plugins/pluginomatic_fintest/static/js/test.js
Normal file
|
@ -0,0 +1 @@
|
|||
exports.foo = 42;
|
Loading…
Add table
Add a link
Reference in a new issue