Added a simple test plugin that doesn't do much

pull/528/head
Egil Moeller 2012-02-24 20:03:58 +01:00
parent 168f481980
commit 30b018833c
5 changed files with 64 additions and 0 deletions

View File

@ -0,0 +1,7 @@
.git*
docs/
examples/
support/
test/
testing.js
.DS_Store

View File

@ -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>");
});
}

View File

@ -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" }
}

View File

@ -0,0 +1,3 @@
exports.somehook = function (hook_name, args, cb) {
return cb(["partlast:somehook was here"]);
}

View File

@ -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"
}
}
]
}