{"id":13495306,"url":"https://github.com/floatdrop/gulp-plumber","last_synced_at":"2025-05-15T00:06:48.642Z","repository":{"id":12993187,"uuid":"15672197","full_name":"floatdrop/gulp-plumber","owner":"floatdrop","description":"Fixing Node pipes","archived":false,"fork":false,"pushed_at":"2018-11-27T16:39:27.000Z","size":68,"stargazers_count":807,"open_issues_count":18,"forks_count":29,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-05-06T09:46:23.006Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/floatdrop.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-01-06T11:20:04.000Z","updated_at":"2025-04-19T19:55:30.000Z","dependencies_parsed_at":"2022-09-10T22:31:48.381Z","dependency_job_id":null,"html_url":"https://github.com/floatdrop/gulp-plumber","commit_stats":null,"previous_names":[],"tags_count":29,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/floatdrop%2Fgulp-plumber","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/floatdrop%2Fgulp-plumber/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/floatdrop%2Fgulp-plumber/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/floatdrop%2Fgulp-plumber/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/floatdrop","download_url":"https://codeload.github.com/floatdrop/gulp-plumber/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254249198,"owners_count":22039029,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T19:01:33.380Z","updated_at":"2025-05-15T00:06:48.609Z","avatar_url":"https://github.com/floatdrop.png","language":"JavaScript","funding_links":[],"categories":["JavaScript","插件","Plugins"],"sub_categories":["其他插件","Miscellaneous Plugins"],"readme":"# :monkey: gulp-plumber\n[![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Dependency Status][depstat-image]][depstat-url]\n\n\u003e Prevent pipe breaking caused by errors from [gulp](https://github.com/wearefractal/gulp) plugins\n\nThis :monkey:-patch plugin is fixing [issue with Node Streams piping](https://github.com/gulpjs/gulp/issues/91). For explanations, read [this small article](https://gist.github.com/floatdrop/8269868).\n\nBriefly it replaces `pipe` method and removes standard `onerror` handler on `error` event, which unpipes streams on error by default.\n\n## Usage :monkey:\n\nFirst, install `gulp-plumber` as a development dependency:\n\n```shell\nnpm install --save-dev gulp-plumber\n```\n\nThen, add it to your `gulpfile.js`:\n\n```javascript\nvar plumber = require('gulp-plumber');\nvar coffee = require('gulp-coffee');\n\ngulp.src('./src/*.ext')\n\t.pipe(plumber())\n\t.pipe(coffee())\n\t.pipe(gulp.dest('./dist'));\n```\n\n## API :monkey:\n\n### :monkey: plumber([options])\n\nReturns Stream, that fixes `pipe` methods on Streams that are next in pipeline.\n\n#### options\nType: `Object` / `Function`\nDefault: `{}`\n\nSets options described below from its properties. If type is `Function` it will be set as `errorHandler`.\n\n#### options.inherit\nType: `Boolean`\nDefault: `true`\n\nMonkeypatch `pipe` functions in underlying streams in pipeline.\n\n#### options.errorHandler\nType: `Boolean` / `Function` \u003cbr/\u003e\nDefault: `true`\n\nHandle errors in underlying streams and output them to console.\n * `function` - it will be attached to stream `on('error')`.\n * `false` - error handler will not be attached.\n * `true` - default error handler will be attached.\n\n### plumber.stop()\n\nThis method will return default behaviour for pipeline after it was piped.\n\n```javascript\nvar plumber = require('gulp-plumber');\n\ngulp.src('./src/*.scss')\n    .pipe(plumber())\n    .pipe(sass())\n    .pipe(uglify())\n    .pipe(plumber.stop())\n    .pipe(gulp.dest('./dist'));\n```\n\n## License :monkey:\n\n[MIT License](http://en.wikipedia.org/wiki/MIT_License)\n\n[npm-url]: https://npmjs.org/package/gulp-plumber\n[npm-image]: http://img.shields.io/npm/v/gulp-plumber.svg?style=flat\n\n[travis-url]: https://travis-ci.org/floatdrop/gulp-plumber\n[travis-image]: http://img.shields.io/travis/floatdrop/gulp-plumber.svg?style=flat\n\n[depstat-url]: https://david-dm.org/floatdrop/gulp-plumber\n[depstat-image]: http://img.shields.io/david/floatdrop/gulp-plumber.svg?style=flat\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffloatdrop%2Fgulp-plumber","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffloatdrop%2Fgulp-plumber","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffloatdrop%2Fgulp-plumber/lists"}