pipe icon indicating copy to clipboard operation
pipe copied to clipboard

doesn't work with gulp?

Open laggingreflex opened this issue 8 years ago • 0 comments

I'm trying to use this with gulp

Expected behavior:

With gulpfile.js:

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

gulp.task('test', function() {
  return gulp.src('./**/*.*')
  .pipe(print(p => 'file:' + p))
  .pipe(gulp.dest('.'));
});

doing gulp test:

$ gulp test
Starting 'test'...
file:gulpfile.js
Finished 'test' after 82 ms

It correctly shows "finished".

But using this pipe library it doesn't work:

gulpfile.js:

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

require('pipe').install();

gulp.task('test', function() {
  return gulp.src('./**/*.*') |
  print(p => 'file:' + p) |
  gulp.dest('.');
});
$ gulp test
Starting 'test'...
file:gulpfile.js
The following tasks did not complete: test
Did you forget to signal async completion?

it doesn't finish.

gulp.src() pipes to print() correctly it seems, which means it's at least partially working.

Does gulp.dest() not get piped for some reason?

laggingreflex avatar Mar 19 '16 20:03 laggingreflex