The big rename of pluginbs from pluginomatic to ep
This commit is contained in:
parent
758666c3e1
commit
da52353ba3
|
@ -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"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
|
@ -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);
|
console.log("FOOO:", test.foo);
|
||||||
|
|
||||||
exports.somehook = function (hook_name, args, cb) {
|
exports.somehook = function (hook_name, args, cb) {
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"name": "pluginomatic_fintest",
|
"name": "ep_fintest",
|
||||||
"description": "A test plugin",
|
"description": "A test plugin",
|
||||||
"version": "0.0.1",
|
"version": "0.0.1",
|
||||||
"author": "RedHog (Egil Moeller) <egil.moller@freecode.no>",
|
"author": "RedHog (Egil Moeller) <egil.moller@freecode.no>",
|
|
@ -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"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
|
@ -23,7 +23,7 @@ node-inspector &
|
||||||
echo "If you are new to node-inspector, take a look at this video: http://youtu.be/AOnK3NVnxL8"
|
echo "If you are new to node-inspector, take a look at this video: http://youtu.be/AOnK3NVnxL8"
|
||||||
|
|
||||||
cd "node"
|
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 node-inspector before ending
|
||||||
kill $!
|
kill $!
|
||||||
|
|
|
@ -58,8 +58,8 @@ echo "Ensure that all dependencies are up to date..."
|
||||||
(
|
(
|
||||||
mkdir -p node_modules
|
mkdir -p node_modules
|
||||||
cd node_modules
|
cd node_modules
|
||||||
[ -e pluginomatic_etherpad-lite ] || ln -s ../src pluginomatic_etherpad-lite
|
[ -e ep_etherpad-lite ] || ln -s ../src ep_etherpad-lite
|
||||||
cd pluginomatic_etherpad-lite
|
cd ep_etherpad-lite
|
||||||
npm install
|
npm install
|
||||||
) || {
|
) || {
|
||||||
rm -rf node_modules
|
rm -rf node_modules
|
||||||
|
|
|
@ -25,4 +25,4 @@ bin/installDeps.sh $* || exit 1
|
||||||
|
|
||||||
#Move to the node folder and start
|
#Move to the node folder and start
|
||||||
echo "start..."
|
echo "start..."
|
||||||
node node_modules/pluginomatic_etherpad-lite/node/server.js $*
|
node node_modules/ep_etherpad-lite/node/server.js $*
|
||||||
|
|
|
@ -10,9 +10,9 @@ exports.expressCreateServer = function (hook_name, args, cb) {
|
||||||
res.end();
|
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,
|
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) {
|
args.app.get(/^\/static\/([^\/]+)\/plugins\/([^\/]+)\/(.*)/, function(req, res) {
|
||||||
var type_dir = req.params[0].replace(/\.\./g, '').split("?")[0];
|
var type_dir = req.params[0].replace(/\.\./g, '').split("?")[0];
|
||||||
|
|
|
@ -8,7 +8,7 @@ var fs = require("fs");
|
||||||
var tsort = require("./tsort");
|
var tsort = require("./tsort");
|
||||||
var util = require("util");
|
var util = require("util");
|
||||||
|
|
||||||
exports.prefix = 'pluginomatic_';
|
exports.prefix = 'ep_';
|
||||||
exports.loaded = false;
|
exports.loaded = false;
|
||||||
exports.plugins = {};
|
exports.plugins = {};
|
||||||
exports.parts = [];
|
exports.parts = [];
|
||||||
|
@ -43,7 +43,7 @@ exports.update = function (cb) {
|
||||||
exports.getPackages(function (er, packages) {
|
exports.getPackages(function (er, packages) {
|
||||||
var parts = [];
|
var parts = [];
|
||||||
var plugins = {};
|
var plugins = {};
|
||||||
// Load plugin metadata pluginomatic.json
|
// Load plugin metadata ep.json
|
||||||
async.forEach(
|
async.forEach(
|
||||||
Object.keys(packages),
|
Object.keys(packages),
|
||||||
function (plugin_name, cb) {
|
function (plugin_name, cb) {
|
||||||
|
@ -98,7 +98,7 @@ exports.extractHooks = function (parts) {
|
||||||
}
|
}
|
||||||
|
|
||||||
exports.loadPlugin = function (packages, plugin_name, plugins, parts, cb) {
|
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(
|
fs.readFile(
|
||||||
plugin_path,
|
plugin_path,
|
||||||
function (er, data) {
|
function (er, data) {
|
||||||
|
|
|
@ -6,9 +6,9 @@ var CLIENT_JS_SRC = path.normalize(path.join(__dirname, '../../static/js'));
|
||||||
|
|
||||||
global.ep_require = function (url) {
|
global.ep_require = function (url) {
|
||||||
if (url.indexOf("/plugins/") == 0) {
|
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,
|
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 = url.split("/");
|
||||||
url.splice(0, 1);
|
url.splice(0, 1);
|
||||||
|
@ -24,9 +24,9 @@ global.ep_require = function (url) {
|
||||||
|
|
||||||
global.ep_client_require = function (url) {
|
global.ep_client_require = function (url) {
|
||||||
if (url.indexOf("/plugins/") == 0) {
|
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,
|
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
|
For more information see hooks/express/static.js
|
||||||
*/
|
*/
|
||||||
url = url.split("/");
|
url = url.split("/");
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"name" : "pluginomatic_etherpad-lite",
|
"name" : "ep_etherpad-lite",
|
||||||
"description" : "A Etherpad based on node.js",
|
"description" : "A Etherpad based on node.js",
|
||||||
"homepage" : "https://github.com/Pita/etherpad-lite",
|
"homepage" : "https://github.com/Pita/etherpad-lite",
|
||||||
"keywords" : ["etherpad", "realtime", "collaborative", "editor"],
|
"keywords" : ["etherpad", "realtime", "collaborative", "editor"],
|
||||||
|
|
Loading…
Reference in New Issue