# gulp-msg

> show command line messages

Latest version **0.0.4** (published 2017-05-22) · MIT license · 0 weekly downloads

## Install

```sh
npm install gulp-msg
pnpm add gulp-msg
yarn add gulp-msg
bun add gulp-msg
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.4 |
| Published | 2017-05-22 |
| First published | 2015-05-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 0.10 |
| Dependencies | 4 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | tamtakoe |
| Maintainers | tamtakoe |
| Keywords | gulpplugin, notification |

## Links

- npm: https://www.npmjs.com/package/gulp-msg
- Repository: https://github.com/tamtakoe/gulp-msg
- Issues: https://github.com/tamtakoe/gulp-msg/issues
- npm.io page: https://npm.io/package/gulp-msg

## Dependencies (4)

- [lodash](https://npm.io/package/lodash.md) ^4.17.4
- [through2](https://npm.io/package/through2.md) ^2.0.3
- [gulp-util](https://npm.io/package/gulp-util.md) ^3.0.8
- [pretty-hrtime](https://npm.io/package/pretty-hrtime.md) ^1.0.3

## Alternatives

- [update-check](https://npm.io/package/update-check.md) — 4.0M weekly downloads
- [react-native-onesignal](https://npm.io/package/react-native-onesignal.md) — 134.5K weekly downloads
- [react-redux-toastr](https://npm.io/package/react-redux-toastr.md) — 33.7K weekly downloads
- [@nocobase/plugin-notification-manager](https://npm.io/package/@nocobase/plugin-notification-manager.md) — 2.0K weekly downloads
- [react-simple-toasts](https://npm.io/package/react-simple-toasts.md) — 1.9K weekly downloads

## Recent versions

- 0.0.4 (latest) — 2017-05-22
- 0.0.3 — 2017-05-22
- 0.0.1 — 2015-05-04

## README

# gulp-msg [![NPM version](https://badge.fury.io/js/gulp-msg.svg)](http://badge.fury.io/js/gulp-msg)

> gulp plugin for command line notification

## Install with [npm](npmjs.org)

```sh
npm install gulp-msg
```

## Usage

```js
var msg = require('gulp-msg');

msg.Info('--', 'Notice!', '*');
msg.Info   ('style: <%= name %>', {name: 'info'});
msg.Success('style: <%= name %>', {name: 'success'});
msg.Warning('style: <%= name %>', {name: 'warning'});
msg.Error  ('style: <%= name %>', {name: 'error'});
msg.Note   ('style: <%= name %>', {name: 'note'});
msg.Time   ('style: <%= name %>', {name: 'time'});
```

![screenshot](https://github.com/tamtakoe/gulp-msg/raw/master/example.png)

## API
#### info, success, warning, error, note, time

For example `info`
Use `msg.info` for each file into the stream

```js
gulp.src('src/**/*')
    .pipe(msg.info('Notice!')); //'Notice!' for each file
```

Use `msg.flush.info` at the and of the stream

```js
gulp.src('src/**/*')
    .pipe(msg.flush.info('Notice!')); //'Notice!' at the and of stream
```

Use `msg.Info` from the outside of the stream

```js
msg.Info('Notice!'); //'Notice!' in node.js application
```

### msg.info([before,] message, [after,] [data])

Show message

#### Parameters

##### before
##### after
Type: `String`

Delimiter before/after the message. Each character is repeated 40 times

#### Usage

```js
msg.Info('--', 'Notice!', '*')
```

##### data
Type: `Object`

Data for message. Inherited values:

<pre>
env           - process.env
file          - vinyl file
file.relative - relative path (extra field)
file.basename - basename (extra field)
duration      - duration of streaming
totalDuration - duration from gulpfile start
</pre>


##### message
Type: `String`

Lodash template.

#### Usage

```js
msg.Info('Enviroment: <%= env.NODE_ENV %>. Foo: <%= foo %>', {foo: bar})
//Enviroment: dev. Foo: bar
```


## License

Copyright (c) 2014-2015 Oleg Istomin
Released under the MIT license

***

---
_Source: https://npm.io/package/gulp-msg · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
