Skip to content

Commit

Permalink
Merge pull request #1301 from joelrobichaud/patch-1
Browse files Browse the repository at this point in the history
Update browserify globs example to work with the latest version of globby
  • Loading branch information
contra committed Oct 1, 2015
2 parents 3637449 + c89e43e commit 4762360
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions docs/recipes/browserify-with-globs.md
Expand Up @@ -39,13 +39,7 @@ gulp.task('javascript', function () {

// "globby" replaces the normal "gulp.src" as Browserify
// creates it's own readable stream.
globby(['./entries/*.js'], function(err, entries) {
// ensure any errors from globby are handled
if (err) {
bundledStream.emit('error', err);
return;
}

globby(['./entries/*.js']).then(function(entries) {
// create the Browserify instance.
var b = browserify({
entries: entries,
Expand All @@ -56,6 +50,9 @@ gulp.task('javascript', function () {
// pipe the Browserify stream into the stream we created earlier
// this starts our gulp pipeline.
b.bundle().pipe(bundledStream);
}).catch(function(err) {
// ensure any errors from globby are handled
bundledStream.emit('error', err);
});

// finally, we return the stream, so gulp knows when this task is done.
Expand Down

0 comments on commit 4762360

Please sign in to comment.