post-command-hook-notify-plugin

1.0.2 • Public • Published

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

Package Sidebar

Install

npm i post-command-hook-notify-plugin

Weekly Downloads

0

Version

1.0.2

License

MIT

Unpacked Size

5.37 kB

Total Files

5

Last publish

Collaborators

  • sinventor