summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEgil Moeller <egil.moller@freecode.no>2012-02-24 20:03:58 +0100
committerEgil Moeller <egil.moller@freecode.no>2012-02-24 20:03:58 +0100
commit30b018833c3e3ab7092fe5bea96f02d5fec9e292 (patch)
tree5b75049eb762b393b7eec1a0cb5e00f04729a31f
parent168f4819800450807f2f189fb714df5684328be9 (diff)
downloadetherpad-lite-30b018833c3e3ab7092fe5bea96f02d5fec9e292.zip
Added a simple test plugin that doesn't do much
-rw-r--r--available_plugins/pluginomatic_fintest/.npmignore7
-rw-r--r--available_plugins/pluginomatic_fintest/otherpart.js13
-rw-r--r--available_plugins/pluginomatic_fintest/package.json9
-rw-r--r--available_plugins/pluginomatic_fintest/partlast.js3
-rw-r--r--available_plugins/pluginomatic_fintest/pluginomatic.json32
5 files changed, 64 insertions, 0 deletions
diff --git a/available_plugins/pluginomatic_fintest/.npmignore b/available_plugins/pluginomatic_fintest/.npmignore
new file mode 100644
index 00000000..74bd365b
--- /dev/null
+++ b/available_plugins/pluginomatic_fintest/.npmignore
@@ -0,0 +1,7 @@
+.git*
+docs/
+examples/
+support/
+test/
+testing.js
+.DS_Store
diff --git a/available_plugins/pluginomatic_fintest/otherpart.js b/available_plugins/pluginomatic_fintest/otherpart.js
new file mode 100644
index 00000000..f2a94d35
--- /dev/null
+++ b/available_plugins/pluginomatic_fintest/otherpart.js
@@ -0,0 +1,13 @@
+exports.somehook = function (hook_name, args, cb) {
+ return cb(["otherpart:somehook was here"]);
+}
+
+exports.morehook = function (hook_name, args, cb) {
+ return cb(["otherpart:morehook was here"]);
+}
+
+exports.expressServer = function (hook_name, args, cb) {
+ args.app.get('/otherpart', function(req, res) {
+ res.send("<em>Abra cadabra</em>");
+ });
+}
diff --git a/available_plugins/pluginomatic_fintest/package.json b/available_plugins/pluginomatic_fintest/package.json
new file mode 100644
index 00000000..d5b0531b
--- /dev/null
+++ b/available_plugins/pluginomatic_fintest/package.json
@@ -0,0 +1,9 @@
+{
+ "name": "pluginomatic_fintest",
+ "description": "A test plugin",
+ "version": "0.0.1",
+ "author": "RedHog (Egil Moeller) <egil.moller@freecode.no>",
+ "contributors": [],
+ "dependencies": {},
+ "engines": { "node": ">= 0.4.1 < 0.7.0" }
+}
diff --git a/available_plugins/pluginomatic_fintest/partlast.js b/available_plugins/pluginomatic_fintest/partlast.js
new file mode 100644
index 00000000..c3f1fc3e
--- /dev/null
+++ b/available_plugins/pluginomatic_fintest/partlast.js
@@ -0,0 +1,3 @@
+exports.somehook = function (hook_name, args, cb) {
+ return cb(["partlast:somehook was here"]);
+}
diff --git a/available_plugins/pluginomatic_fintest/pluginomatic.json b/available_plugins/pluginomatic_fintest/pluginomatic.json
new file mode 100644
index 00000000..3b34c7ce
--- /dev/null
+++ b/available_plugins/pluginomatic_fintest/pluginomatic.json
@@ -0,0 +1,32 @@
+{
+ "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",
+ "expressServer": "pluginomatic_fintest/otherpart:expressServer"
+ }
+ }
+ ]
+}