Harmony Event Emitter
Introduction
Harmony Event Emitter allows you to quickly integrate Harmony into any node workflow.
Quick Start
Install Harmony Event Emitter.
$ npm install harmony-event-emitter
Use Harmony Event Emitter.
var harmonyEventEmitter = ; // DEV: Set the workspace if it is not the current working directory// harmonyEventEmitter.setWorkspace("/path/to/workspace"); harmonyEventEmitter;harmonyEventEmitter; harmonyEventEmitter; // DEV: More examples;;
Functions
- hideSpinner(name)
Hide a task's spinner. If necessary, the task will be automatically created.
- pushNotification(name, subtitle, description, sound)
Show a task's spinner. If necessary, the task will be automatically created.
- remove(name)
Remove a task.
- setColor(name, color)
Show a task's color. If necessary, the task will be automatically created.
- setWorkspace(newWorkspace)
Set the workspace in which events will be written.
- showSpinner(name)
Show a task's spinner. If necessary, the task will be automatically created.
hideSpinner(name)
Hide a task's spinner. If necessary, the task will be automatically created.
Param | Type | Description |
---|---|---|
name | string |
The task's name. |
pushNotification(name, subtitle, description, sound)
Show a task's spinner. If necessary, the task will be automatically created.
Param | Type | Description |
---|---|---|
name | string |
The task's name. |
subtitle | string |
The notification's subtitle. An empty string will hide the subtitle. |
description | string |
The notification's description. An empty string will hide the description. |
sound | string |
The notification's sound. An empty string will result in the system default sound. A void or null string will result in no sound. |
remove(name)
Remove a task.
Param | Type | Description |
---|---|---|
name | string |
The task's name. |
setColor(name, color)
Show a task's color. If necessary, the task will be automatically created.
Param | Type | Description |
---|---|---|
name | string |
The task's name. |
color | string |
The task's color. RGB hex format, leading # optional. (E.g. #A1B2C3) |
setWorkspace(newWorkspace)
Set the workspace in which events will be written. The default value is the current working directory.
Param | Type | Description |
---|---|---|
newWorkspace | string |
The workspace in which events will be written. |
showSpinner(name)
Show a task's spinner. If necessary, the task will be automatically created.
Param | Type | Description |
---|---|---|
name | string |
The task's name. |
License
Harmony Event Emitter may be freely distributed under the MIT license.
Copyright (c) 2016 Evernaut