From 359dece03752d51e989e6aa1c3aeeb2c1957ca8c Mon Sep 17 00:00:00 2001 From: Blaine Bublitz Date: Wed, 1 Apr 2015 16:13:10 -0700 Subject: [PATCH] add note about handling stream errors --- docs/recipes/browserify-uglify-sourcemap.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/recipes/browserify-uglify-sourcemap.md b/docs/recipes/browserify-uglify-sourcemap.md index cbc517571..16f78ee5b 100644 --- a/docs/recipes/browserify-uglify-sourcemap.md +++ b/docs/recipes/browserify-uglify-sourcemap.md @@ -4,6 +4,8 @@ tool but requires being wrapped before working well with gulp. Below is a simple recipe for using Browserify with transforms and full sourcemaps that resolve to the original individual files. +See also: the [Combining Streams to Handle Errors](https://github.com/gulpjs/gulp/blob/master/docs/recipes/combining-streams-to-handle-errors.md) recipe for handling errors with browserify or uglify in your stream. + ``` javascript 'use strict'; @@ -15,12 +17,12 @@ var sourcemaps = require('gulp-sourcemaps'); var gutil = require('gulp-util'); gulp.task('javascript', function () { - // transform regular node stream to gulp (buffered vinyl) stream + // transform regular node stream to gulp (buffered vinyl) stream var browserified = transform(function(filename) { var b = browserify({entries: filename, debug: true}); return b.bundle(); }); - + return gulp.src('./app.js') .pipe(browserified) .pipe(sourcemaps.init({loadMaps: true}))