mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-22 16:36:15 -04:00
The big rename of pluginbs from pluginomatic to ep
This commit is contained in:
parent
758666c3e1
commit
da52353ba3
16 changed files with 48 additions and 48 deletions
|
@ -10,9 +10,9 @@ exports.expressCreateServer = function (hook_name, args, cb) {
|
|||
res.end();
|
||||
});
|
||||
|
||||
/* Handle paths like "/static/js/plugins/pluginomatic_myplugin/test.js"
|
||||
/* Handle paths like "/static/js/plugins/ep_myplugin/test.js"
|
||||
by rewriting it to ROOT_PATH_OF_MYPLUGIN/static/js/test.js,
|
||||
commonly ETHERPAD_ROOT/node_modules/pluginomatic_myplugin/static/js/test.js
|
||||
commonly ETHERPAD_ROOT/node_modules/ep_myplugin/static/js/test.js
|
||||
*/
|
||||
args.app.get(/^\/static\/([^\/]+)\/plugins\/([^\/]+)\/(.*)/, function(req, res) {
|
||||
var type_dir = req.params[0].replace(/\.\./g, '').split("?")[0];
|
||||
|
|
|
@ -8,7 +8,7 @@ var fs = require("fs");
|
|||
var tsort = require("./tsort");
|
||||
var util = require("util");
|
||||
|
||||
exports.prefix = 'pluginomatic_';
|
||||
exports.prefix = 'ep_';
|
||||
exports.loaded = false;
|
||||
exports.plugins = {};
|
||||
exports.parts = [];
|
||||
|
@ -43,7 +43,7 @@ exports.update = function (cb) {
|
|||
exports.getPackages(function (er, packages) {
|
||||
var parts = [];
|
||||
var plugins = {};
|
||||
// Load plugin metadata pluginomatic.json
|
||||
// Load plugin metadata ep.json
|
||||
async.forEach(
|
||||
Object.keys(packages),
|
||||
function (plugin_name, cb) {
|
||||
|
@ -98,7 +98,7 @@ exports.extractHooks = function (parts) {
|
|||
}
|
||||
|
||||
exports.loadPlugin = function (packages, plugin_name, plugins, parts, cb) {
|
||||
var plugin_path = path.resolve(packages[plugin_name].path, "pluginomatic.json");
|
||||
var plugin_path = path.resolve(packages[plugin_name].path, "ep.json");
|
||||
fs.readFile(
|
||||
plugin_path,
|
||||
function (er, data) {
|
||||
|
|
|
@ -6,9 +6,9 @@ var CLIENT_JS_SRC = path.normalize(path.join(__dirname, '../../static/js'));
|
|||
|
||||
global.ep_require = function (url) {
|
||||
if (url.indexOf("/plugins/") == 0) {
|
||||
/* Handle paths like "/plugins/pluginomatic_myplugin/test.js"
|
||||
/* Handle paths like "/plugins/ep_myplugin/test.js"
|
||||
by rewriting it to ROOT_PATH_OF_MYPLUGIN/test.js,
|
||||
commonly ETHERPAD_ROOT/node_modules/pluginomatic_myplugin/test.js
|
||||
commonly ETHERPAD_ROOT/node_modules/ep_myplugin/test.js
|
||||
*/
|
||||
url = url.split("/");
|
||||
url.splice(0, 1);
|
||||
|
@ -24,9 +24,9 @@ global.ep_require = function (url) {
|
|||
|
||||
global.ep_client_require = function (url) {
|
||||
if (url.indexOf("/plugins/") == 0) {
|
||||
/* Handle paths like "/plugins/pluginomatic_myplugin/test.js"
|
||||
/* Handle paths like "/plugins/ep_myplugin/test.js"
|
||||
by rewriting it to ROOT_PATH_OF_MYPLUGIN/static/js/test.js,
|
||||
commonly ETHERPAD_ROOT/node_modules/pluginomatic_myplugin/static/js/test.js
|
||||
commonly ETHERPAD_ROOT/node_modules/ep_myplugin/static/js/test.js
|
||||
For more information see hooks/express/static.js
|
||||
*/
|
||||
url = url.split("/");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue