diff --git a/available_plugins/pluginomatic_fintest/.npmignore b/available_plugins/ep_fintest/.npmignore similarity index 100% rename from available_plugins/pluginomatic_fintest/.npmignore rename to available_plugins/ep_fintest/.npmignore diff --git a/available_plugins/ep_fintest/ep.json b/available_plugins/ep_fintest/ep.json new file mode 100644 index 00000000..aec7d9c1 --- /dev/null +++ b/available_plugins/ep_fintest/ep.json @@ -0,0 +1,32 @@ +{ + "parts": [ + { + "name": "somepart", + "pre": [], + "post": ["ep_onemoreplugin/partone"] + }, + { + "name": "partlast", + "pre": ["ep_fintest/otherpart"], + "post": [], + "hooks": { + "somehookname": "ep_fintest/partlast:somehook" + } + }, + { + "name": "partfirst", + "pre": [], + "post": ["ep_onemoreplugin/somepart"] + }, + { + "name": "otherpart", + "pre": ["ep_fintest/somepart", "ep_otherplugin/main"], + "post": [], + "hooks": { + "somehookname": "ep_fintest/otherpart:somehook", + "morehook": "ep_fintest/otherpart:morehook", + "expressCreateServer": "ep_fintest/otherpart:expressServer" + } + } + ] +} diff --git a/available_plugins/pluginomatic_fintest/otherpart.js b/available_plugins/ep_fintest/otherpart.js similarity index 85% rename from available_plugins/pluginomatic_fintest/otherpart.js rename to available_plugins/ep_fintest/otherpart.js index bf9bf1de..36fea8d8 100644 --- a/available_plugins/pluginomatic_fintest/otherpart.js +++ b/available_plugins/ep_fintest/otherpart.js @@ -1,4 +1,4 @@ -test = ep_client_require("/plugins/pluginomatic_fintest/test.js"); +test = ep_client_require("/plugins/ep_fintest/test.js"); console.log("FOOO:", test.foo); exports.somehook = function (hook_name, args, cb) { diff --git a/available_plugins/pluginomatic_fintest/package.json b/available_plugins/ep_fintest/package.json similarity index 87% rename from available_plugins/pluginomatic_fintest/package.json rename to available_plugins/ep_fintest/package.json index 8ee3fd36..342bef59 100644 --- a/available_plugins/pluginomatic_fintest/package.json +++ b/available_plugins/ep_fintest/package.json @@ -1,5 +1,5 @@ { - "name": "pluginomatic_fintest", + "name": "ep_fintest", "description": "A test plugin", "version": "0.0.1", "author": "RedHog (Egil Moeller) ", diff --git a/available_plugins/pluginomatic_fintest/partlast.js b/available_plugins/ep_fintest/partlast.js similarity index 100% rename from available_plugins/pluginomatic_fintest/partlast.js rename to available_plugins/ep_fintest/partlast.js diff --git a/available_plugins/pluginomatic_fintest/static/js/test.js b/available_plugins/ep_fintest/static/js/test.js similarity index 100% rename from available_plugins/pluginomatic_fintest/static/js/test.js rename to available_plugins/ep_fintest/static/js/test.js diff --git a/available_plugins/pluginomatic_fintest/static/test.html b/available_plugins/ep_fintest/static/test.html similarity index 100% rename from available_plugins/pluginomatic_fintest/static/test.html rename to available_plugins/ep_fintest/static/test.html diff --git a/available_plugins/pluginomatic_fintest/pluginomatic.json b/available_plugins/pluginomatic_fintest/pluginomatic.json deleted file mode 100644 index 0e94dc17..00000000 --- a/available_plugins/pluginomatic_fintest/pluginomatic.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "parts": [ - { - "name": "somepart", - "pre": [], - "post": ["pluginomatic_onemoreplugin/partone"] - }, - { - "name": "partlast", - "pre": ["pluginomatic_fintest/otherpart"], - "post": [], - "hooks": { - "somehookname": "pluginomatic_fintest/partlast:somehook" - } - }, - { - "name": "partfirst", - "pre": [], - "post": ["pluginomatic_onemoreplugin/somepart"] - }, - { - "name": "otherpart", - "pre": ["pluginomatic_fintest/somepart", "pluginomatic_otherplugin/main"], - "post": [], - "hooks": { - "somehookname": "pluginomatic_fintest/otherpart:somehook", - "morehook": "pluginomatic_fintest/otherpart:morehook", - "expressCreateServer": "pluginomatic_fintest/otherpart:expressServer" - } - } - ] -} diff --git a/bin/debugRun.sh b/bin/debugRun.sh index e113f67b..28f763ce 100755 --- a/bin/debugRun.sh +++ b/bin/debugRun.sh @@ -23,7 +23,7 @@ node-inspector & echo "If you are new to node-inspector, take a look at this video: http://youtu.be/AOnK3NVnxL8" cd "node" -node --debug node_modules/pluginomatic_etherpad-lite/node/server.js $* +node --debug node_modules/ep_etherpad-lite/node/server.js $* #kill node-inspector before ending kill $! diff --git a/bin/installDeps.sh b/bin/installDeps.sh index 640f5b13..e2a43c53 100755 --- a/bin/installDeps.sh +++ b/bin/installDeps.sh @@ -58,8 +58,8 @@ echo "Ensure that all dependencies are up to date..." ( mkdir -p node_modules cd node_modules - [ -e pluginomatic_etherpad-lite ] || ln -s ../src pluginomatic_etherpad-lite - cd pluginomatic_etherpad-lite + [ -e ep_etherpad-lite ] || ln -s ../src ep_etherpad-lite + cd ep_etherpad-lite npm install ) || { rm -rf node_modules diff --git a/bin/run.sh b/bin/run.sh index 296b6754..82e89a94 100755 --- a/bin/run.sh +++ b/bin/run.sh @@ -25,4 +25,4 @@ bin/installDeps.sh $* || exit 1 #Move to the node folder and start echo "start..." -node node_modules/pluginomatic_etherpad-lite/node/server.js $* +node node_modules/ep_etherpad-lite/node/server.js $* diff --git a/src/pluginomatic.json b/src/ep.json similarity index 100% rename from src/pluginomatic.json rename to src/ep.json diff --git a/src/node/hooks/express/static.js b/src/node/hooks/express/static.js index a160423d..eb7f03a9 100644 --- a/src/node/hooks/express/static.js +++ b/src/node/hooks/express/static.js @@ -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]; diff --git a/src/node/pluginfw/plugins.js b/src/node/pluginfw/plugins.js index e5646d27..0e8ca45b 100644 --- a/src/node/pluginfw/plugins.js +++ b/src/node/pluginfw/plugins.js @@ -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) { diff --git a/src/node/pluginfw/require.js b/src/node/pluginfw/require.js index 887c5549..8d64cbd6 100644 --- a/src/node/pluginfw/require.js +++ b/src/node/pluginfw/require.js @@ -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("/"); diff --git a/src/package.json b/src/package.json index a95a1ff2..8aa98fc6 100644 --- a/src/package.json +++ b/src/package.json @@ -1,5 +1,5 @@ { - "name" : "pluginomatic_etherpad-lite", + "name" : "ep_etherpad-lite", "description" : "A Etherpad based on node.js", "homepage" : "https://github.com/Pita/etherpad-lite", "keywords" : ["etherpad", "realtime", "collaborative", "editor"],