hee

harmony-event-emitter

Event emitter for Harmony.

Showing:

Popularity

Downloads/wk

1

Maintenance

No Maintenance Data Available

Package

Dependencies

1

Size (min+gzip)

1.0KB

License

MIT

Type Definitions

Tree-Shakeable

No?

Categories

Readme

Harmony Event Emitter

NPM

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 = require("harmony-event-emitter");

// DEV: Set the workspace if it is not the current working directory
// harmonyEventEmitter.setWorkspace("/path/to/workspace");

harmonyEventEmitter.setColor("Build Watch", "#A1B2C3");
harmonyEventEmitter.showSpinner("Build Watch");

harmonyEventEmitter.pushNotification("Lint Watch", "Failed", "3 errors", "Sosumi");

// DEV: More examples
setTimeout(function() {harmonyEventEmitter.hideSpinner("Build Watch");}, 2000);
setTimeout(function() {harmonyEventEmitter.remove("Lint Watch");}, 4000);

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.

ParamTypeDescription
namestringThe task's name.

pushNotification(name, subtitle, description, sound)

Show a task's spinner. If necessary, the task will be automatically created.

ParamTypeDescription
namestringThe task's name.
subtitlestringThe notification's subtitle. An empty string will hide the subtitle.
descriptionstringThe notification's description. An empty string will hide the description.
soundstringThe 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.

ParamTypeDescription
namestringThe task's name.

setColor(name, color)

Show a task's color. If necessary, the task will be automatically created.

ParamTypeDescription
namestringThe task's name.
colorstringThe 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.

ParamTypeDescription
newWorkspacestringThe workspace in which events will be written.

showSpinner(name)

Show a task's spinner. If necessary, the task will be automatically created.

ParamTypeDescription
namestringThe task's name.

License

Harmony Event Emitter may be freely distributed under the MIT license.

Copyright (c) 2016 Evernaut

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100