-
Notifications
You must be signed in to change notification settings - Fork 14
Conversation
@@ -1,5 +1,8 @@ | |||
language: node_js | |||
|
|||
node_js: | |||
- 0.10 | |||
- 4.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Quotes everywhere.
|
||
var value = manifest[key]; | ||
const value = manifest[key]; | ||
if (typeof value === 'string' && | ||
value.indexOf('$env.') === 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
value.startsWith('$env.')
"events": { "ops": "*" }, | ||
"config": "/log/ops.log" | ||
}] | ||
"registrations": [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
instead of registrations requiring an array of objects, you could simplify... if its a string then its the plugin name, if its an object then its the plugin with register and options.
"registrations": [
{
"register": "good",
"options": { }
},
"lout"
]
You could take it a step further, if its an object, then the key is the plugin name, and the value are the options.
"registrations": [
{
"good": { // options here },
"tv": { //options here }
},
"lout"
]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I think it would be a good idea to simplify the manifest (I don't know what was wrong with just plugins vs registrations before but rejoice just implements glue manifests and this is how it is currently being implemented with 3.x.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@geek: Please note that registration options (once
, select
, routes
) need to be passed as well and they should not be in options
as options
are passed to the plugin.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hapijs/glue#31 explains the change to the manifest format.
The simplest form you can pass as registrations is:
"registrations": [
{ "plugin": "good" },
{ "plugin": "tv" }
]
I'd possibly be open to a pull request to support the form of:
"registrations": [
"good",
"tv"
]
But I'm not sold on it yet.
No description provided.