This repository has been archived by the owner on Jul 1, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 24
events
Marcel Kloubert edited this page Apr 1, 2017
·
7 revisions
Defines one or more global events.
{
"deploy": {
"events": [
{
"name": "myEvent",
"script": "./myEvent.js"
}
]
}
}
A script must have an public / exported raiseEvent()
function:
exports.raiseEvent = function(args) {
// your code
}
args
uses the EventModuleExecutorArguments interface.
You can return a number (sync execution), a Promise or nothing (default exit code 0
).
Name | Description |
---|---|
description |
A description for that event. |
if |
One or more conditions (as JavaScript code) that defines if event is available or not, similar to [[values |
isFor |
A list of one or more (host)names that event is for. |
name |
The name of the event. |
once |
Execute once or not. Default: (false)
|
options |
Options / data for the execution. |
platforms |
One or more platform names the event is for. s. process.platform |
sortOrder |
An optional number or object to sort the elements. If this value is an object, it is searched for a property that contains the name of the current machine, by using its value as sort value. Default: 0
|
script *
|
The path to the script to execute. |
state |
The initial value for the state. |
* supports placeholders