Socket
Socket
Sign inDemoInstall

bell-on-bundler-error-plugin

Package Overview
Dependencies
0
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.0.0 to 3.0.0

28

index.js

@@ -1,2 +0,1 @@

// Copyright 2015-2016 Stanislav Senotrusov

@@ -16,11 +15,30 @@ //

function BellOnBundlerErrorPlugin () { }
function BellOnBundlerErrorPlugin() {}
BellOnBundlerErrorPlugin.prototype.apply = function(compiler) {
if (typeof(process) !== 'undefined'){
compiler.plugin('done', function(stats) { if (stats.hasErrors()) process.stderr.write('\x07') })
compiler.plugin('failed', function(err) { process.stderr.write('\x07') })
if (typeof process === 'undefined') {
return
}
var doneFunc = function(stats) {
if (stats.hasErrors()) {
process.stderr.write('\x07')
}
}
var failedFunc = function(err) {
process.stderr.write('\x07')
}
if (compiler.hooks) {
var plugin = { name: 'BellOnBundlerErrorPlugin' }
compiler.hooks.done.tap(plugin, doneFunc)
compiler.hooks.failed.tap(plugin, failedFunc)
} else {
compiler.plugin('done', doneFunc)
compiler.plugin('failed', failedFunc)
}
}
module.exports = BellOnBundlerErrorPlugin

2

package.json
{
"name": "bell-on-bundler-error-plugin",
"version": "2.0.0",
"version": "3.0.0",
"description": "Get notification on bundler build errors. On that occasion, a bell character will be written to STDERR output.",

@@ -5,0 +5,0 @@ "keywords": [

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc