项目作者: runnerty

项目描述 :
Runnerty module: Console notifier.
高级语言: JavaScript
项目地址: git://github.com/runnerty/notifier-console.git
创建时间: 2018-01-26T07:30:41Z
项目社区:https://github.com/runnerty/notifier-console

开源协议:MIT License

下载






Smart Processes Management


@runnerty/notifier-console"">NPM version @runnerty/notifier-console"">Downloads Dependency Status

code style: prettier

A simple console notifier for Runnerty

Installation:

Through NPM

  1. npm i @runnerty/notifier-console

You can also add modules to your project with runnerty

  1. npx runnerty add @runnerty/notifier-console

This command installs the module in your project, adds example configuration in your config.json and creates an example plan of use.

If you have installed runnerty globally you can include the module with this command:

  1. runnerty add @runnerty/notifier-console

Configuration sample:

Add in config.json:

  1. {
  2. "notifiers": [
  3. {
  4. "id": "console_default",
  5. "type": "@runnerty-notifier-console"
  6. }
  7. ]
  8. }

Usage

Define the type of console message that you need (or prefer) in your process’ events

info mode

info notification on console

  1. {
  2. "notifications": {
  3. "on_end": [
  4. {
  5. "id": "console_default",
  6. "message": "Things done right.",
  7. "mode": "info"
  8. }
  9. ]
  10. }

warn mode

warning notification on console

  1. {
  2. "id": "console_default",
  3. "message": "We are out of candy!",
  4. "mode": "warn"
  5. }

error mode

error notification on console

  1. {
  2. "id": "console_default",
  3. "message": "Oh no.",
  4. "mode": "error"
  5. }