diff options
Diffstat (limited to 'available_plugins')
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" + } + } + ] +} |