1.0.2 • Published 3 years ago

post-command-hook-notify-plugin v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

post-command-hook-notify-plugin NPM version

Post command hook plugin to notify after command execution.

Notify plugin for post-command-hook that gives you a possibility to send a notification after some command have been executed using node-notifier.

Installation

$ npm install --save post-command-hook-notify-plugin

Usage

const PostCommandHook = require('post-command-hook');
const PostCommandHookNotifyPlugin = require('post-command-hook-notify-plugin');

const postCommandHook = new PostCommandHook({ command: 'npx', args: ['create-react-app', 'myapp'] });
postCommandHook.use(new PostCommandHookNotifyPlugin('myapp have been generated')).run();

API

new NotifyPostCommandHookPlugin(message, options = {})

Constructs an instance of NotifyPostCommandHookPlugin class providing message and options.

message

A message to be displayed. It can be string or object with title and message keys. Please see node-notifier documentation for details.

options

Additional optional options.

premessage

A message to be shown in the console before sending a notification.

postmessage

A message to be shown in the console after sending a notification.

License

MIT © Rushan Alyautdinov