Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/cyco130/who-said-that

Adds a prefix that identifies the currently running npm script to every line of its output
https://github.com/cyco130/who-said-that

Last synced: about 2 months ago
JSON representation

Adds a prefix that identifies the currently running npm script to every line of its output

Awesome Lists containing this project

README

        

# Who said that?!

Adds a prefix that identifies the currently running npm script to every line of its output.

## Why?
Sometimes it's hard to identify which line of output comes from which script when running multiple npm scripts in parallel or in series like in a monorepo build or a continuous integration output. Just prefix your npm script definition with `who-said-that` and you will have a tag that includes the package name and the script name on every output line.

## How?
Given that you have an npm script like this:

```json
"lint": "who-said-that eslint"
```

You will have an output like this:

[your-package lint]: /path/to/your/file.js

[your-package lint]: 7:40 warning 'x' is defined but never used

And it will help you identify which package (`your-package`) and which script (`lint`) logged these messages when examining a large log, for instance.

## Installation
```sh
npm install --save-dev who-said-that
```

Or you can install it globally if you like:
```sh
npm install -g who-said-that
```

## Credits
- [Fatih Aygün](https://github.com/cyco130), [MIT License](https://opensource.org/licenses/MIT).