gulp-plumber

Fixing Node pipes

  • 所有者: floatdrop/gulp-plumber
  • 平台:
  • 许可证: MIT License
  • 分类:
  • 主题:
  • 喜欢:
    0
      比较:

Github星跟踪图

:monkey: gulp-plumber

NPM version Build Status Dependency Status

Prevent pipe breaking caused by errors from gulp plugins

This :monkey:-patch plugin is fixing issue with Node Streams piping. For explanations, read this small article.

Briefly it replaces pipe method and removes standard onerror handler on error event, which unpipes streams on error by default.

Usage :monkey:

First, install gulp-plumber as a development dependency:

npm install --save-dev gulp-plumber

Then, add it to your gulpfile.js:

var plumber = require('gulp-plumber');
var coffee = require('gulp-coffee');

gulp.src('./src/*.ext')
	.pipe(plumber())
	.pipe(coffee())
	.pipe(gulp.dest('./dist'));

API :monkey:

:monkey: plumber([options])

Returns Stream, that fixes pipe methods on Streams that are next in pipeline.

options

Type: Object / Function
Default: {}

Sets options described below from its properties. If type is Function it will be set as errorHandler.

options.inherit

Type: Boolean
Default: true

Monkeypatch pipe functions in underlying streams in pipeline.

options.errorHandler

Type: Boolean / Function
Default: true

Handle errors in underlying streams and output them to console.

  • function - it will be attached to stream on('error').
  • false - error handler will not be attached.
  • true - default error handler will be attached.

plumber.stop()

This method will return default behaviour for pipeline after it was piped.

var plumber = require('gulp-plumber');

gulp.src('./src/*.scss')
    .pipe(plumber())
    .pipe(sass())
    .pipe(uglify())
    .pipe(plumber.stop())
    .pipe(gulp.dest('./dist'));

License :monkey:

MIT License

主要指标

概览
名称与所有者floatdrop/gulp-plumber
主编程语言JavaScript
编程语言JavaScript (语言数: 1)
平台
许可证MIT License
所有者活动
创建于2014-01-06 11:20:04
推送于2018-11-27 16:39:27
最后一次提交2018-11-27 21:39:06
发布数29
最新版本名称v1.2.1 (发布于 2018-11-27 21:39:06)
第一版名称v0.0.1 (发布于 2014-01-06 17:46:57)
用户参与
星数803
关注者数8
派生数28
提交数116
已启用问题?
问题数52
打开的问题数17
拉请求数12
打开的拉请求数1
关闭的拉请求数0
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?