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

build-error-notifier

v1.0.0

Published

Build error notifications for your build toolchain

Downloads

109

Readme

build-error-notifier

Build error notifications for your build toolchain. Supports browserify, jasmine-node (test runner), karma (test runner), node-sass, tsc (typescript compiler), and tslint. More to come.

Example

What is this?

A CLI tool which notifies you of errors from your build process. Simply pipe build output to build-error-notifier. It recognizes output from a growing list of CLI build tools; see the Usage section for details.

Recognized error messages are displayed using the node-notifier module. Only the basic information, such as the tool, the file, and the line number are displayed in the notification

All input, whether recognized or not, is piped to stdout, so the full error messages will still appear in the terminal log.

It has been designed to play well with npm based build environments, or with any kind of "watching" CLI build tool.

Install

npm install build-error-notifier -g

Usage

For most tools, it's just a matter of piping the output. For some tools, you need to redirect stderr to stdin first, by inserting 2>&1 before the pipe.

browserify (JavaScript compiler)

Example:

browserify scripts/source/main.js -o scripts/bundle.js 2>&1 | build-error-notifier

node-sass (Sass compiler)

Example:

node-sass ./styles.scss -o ./styles.css --watch 2>&1 | build-error-notifier

tsc (TypeScript compiler)

Example:

tsc ./src.ts --out ./out.js --watch | build-error-notifier

tslint (TypeScript linter)

Example:

tslint ./src.ts | build-error-notifier

jasmine-node (Test runner)

Example:

jasmine-node ./test/ --autotest | build-error-notifier

NOTE: You can also use the built-in --growl option if you have paid for growl and if you want it to notify you on successful test runs as well. The build-error-notifier will only notify of errors to avoid "notification fatigue".

karma (Test runner)

Example:

karma start ./test/karma.conf.js --single-run | build-error-notifier

Parameters

Use --addConfig [path to file] to add custom configuration. The file should be a node module and should export a data structure similar to the one defined in build-error-notifier.js. See this file for an example.

Q&A

Why don't you support tool X?

This is just a starting point and is based upon the tools which I frequently use. On the top of my head, I plan to add support for CoffeeScript, ESLint, Less CSS, JSHint, Mocha, and whichever testing frameworks that have gained traction.

Oh, and I accept pull requests. The code is really simple, RegEx based stuff.

Which operating systems will this work on?

macOS for sure. Linux, probably, although I have yet to test it. Windows, maybe to some extent. It won't recognize the backslach file path delimiters as of now, but it would be an easy fix if someone wants it.

Don't I need to tell it which build tool to scan for?

In the current version, no. It will scan for everything. It's simple and I don't think there'll be any real performance impact from this.