New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

gulp-crash-sound

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gulp-crash-sound

Play a WAV or MP3 when gulp crashes.

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
4
increased by33.33%
Maintainers
1
Weekly downloads
 
Created
Source

gulp-crash-sound

Play a WAV or MP3 when gulp crashes.

Errors in gulp tasks tend to crash it. You then spend a few minutes trying to figure out what's gone wrong only to find that gulp crashed and you didn't notice.

Use this plugin to play a sound when gulp crashes so you know you need to fix something.

This plugin can also be used with gulp-plumber.

Installation

$ npm install -g gulp-crash-sound

Examples

The following examples show you 3 ways to use gulp-crash-sound.

1. Just include and use defaults.

var gCrashSound = require('gulp-crash-sound');

gulp.task('build', function() {
	gulp.src('/some/path');
});
// if gulp crashes (for any task) a sound will be played

2. Play a sound in your error handler.

var gCrashSound = require('gulp-crash-sound');

function yourOnErrorFunction(err) {
	gCrashSound.play();
	// handle error
}

// somewhere in gupfile.js
.on('error', yourOnErrorFunction)

3. Wrap gulp-plumber.

var gCrashSound = require('gulp-crash-sound');

// somewhere in gupfile.js
.pipe(plumber({
	errorHandler: gCrashSound.plumb(yourOnErrorFunction)
	// if gulp crashes a sound is played before calling your error function
}))

Configuration

The default sound is a 'gulp' but you can use any WAV or MP3 (drm free).

var gCrashSound = require('gulp-crash-sound');

gCrashSound.config({
	file: '/path/to/your/wav/or/mp3',
	duration: 3 // 3 seconds. can be null (or not set) to play full length which is the default
});

Requirements

  • Linux: aplay
  • OSX: afplay

Known Issues

  • No Windows support

Keywords

FAQs

Package last updated on 02 Apr 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc