question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

gulp.src should be a passthrough stream

See original GitHub issue

This will alleviate the overusage of gulp-if

Example:

gulp.src('files/*.coffee')
  .pipe(coffee())
  .pipe(gulp.src('files/*.js'))
  .pipe(minify())
  .pipe(gulp.dest('dist'))

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Comments:41 (22 by maintainers)

github_iconTop GitHub Comments

1reaction
Janpotcommented, Oct 15, 2014

I usually use merge() from https://github.com/dominictarr/event-stream#merge-stream1streamn

return es.merge(
  gulp.src('./javascript/*.js')
    .pipe(minify()),
  gulp.src('./already-minified/*.js')
)
  .pipe(concat())
  .pipe(gulp.dest('...'));
1reaction
jdancommented, Apr 21, 2014

Is there a current workflow for adding files to the stream midway? I need to conditionally add files based on the content of a previous file.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Gulp 4: Passthrough source streams - fettblog.eu
Gulp 4: Passthrough source streams ... Usually, gulp.src would create a stream of file objects based on the globbing pattern you provide.
Read more >
Gulp - How do i chain together tasks or streams that use ...
gulp.src() can act as a passthrough stream by using the passthrough option: return gulp.src('/dir1/*.js') .pipe(..) .pipe(.
Read more >
Working with Files | gulp.js
It locates all matching files and reads them into memory to pass through the stream. The stream produced by src() should be returned...
Read more >
Chapter 7. Working with streams - Front-End Tooling with Gulp ...
Passthrough streams allow for both being written to and being read from. It turns out that gulp.src is capable of creating both readable...
Read more >
gulp-filter - npm
There are 736 other projects in the npm registry using gulp-filter. ... '!*src/vendor'], {restore: true, passthrough: false}); const stream ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found