npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

stderr

v1.0.1

Published

Flash an OS notification when a process writes to stderr

Downloads

21

Readme

stderr

npm travis

Flash an OS notification when a process writes to stderr

Demo

Install

npm install stderr --save

or

npm install stderr -g

Usage

stderr exports one, single function. Require it and pass in a command, an array of arguments, and (optional) options.

var stderr = require('stderr')
stderr('ls', ['-la'])

This is the same API (and options) as child_process.spawn. All options other than stdio will be passed through.

CLI

The cli is made to be as simple as possible. Simply prefix your command with stderr like so:

stderr ls -la

About

stderr will display a notification when a process:

  1. Writes to stderr
  2. Throws an error

All standard streams are left untouched by stderr. Standard input, output, and error streams should be exactly as they are with the non-prefixed version of the command. That means all piping, redirection, and bash craziness you'd like to get get into should just work.

If you are on a system without notifications (like a server environment) they will simply fail silently, and your program will continue to read and write as usual, there just won't be any notifications.

stderr uses the excellent node-notifier module so be sure to read up on what platforms are supported.

Why

Say Tom is using something like watchify to monitor his JavaScript files and create a new bundle every time a file is updated. At some point while Tom is writing his JavaScript he misses a closing bracket. He keeps refreshing his web browser, wondering what is wrong with his JavaScript and why the bundle isn't updating. He then kicks himself for not realizing it before and switches over to his terminal finding a helpful error message awaiting him.

With stderr, Tom just prepends the word stderr to his watchify command and now his computer magically notifies him that he stupidly missed a closing bracket. This saves him time and needless refreshing.

Contributing

See CONTRIBUTING.md for contribution guidelines.

License

ISC