`pipe(done)` is a mistake and pipe does not work that way.
`on('end')` may not be triggered because `end` is an interval stream event that does not reflect the whole gulp stream operation. Only `finish` should be used to wait for the operation end.
See: https://stackoverflow.com/a/
41003102/
4317384
.pipe(cleancss({ compatibility: 'ie9' }))
.pipe(rename('foundation.min.css'))
.pipe(gulp.dest(path.join(OUTPUT_DIR, 'css')))
- .on('end', done);
+ .on('finish', done);
});
});
.pipe(sourcemaps.write('.'))
.pipe(gulp.dest('./dist/js'))
- .pipe(done);
+ .on('finish', done);
});
});
.pipe(uglify())
.pipe(rename('foundation.min.js'))
.pipe(gulp.dest('./_build/assets/js'))
- .on('end', done);
+ .on('finish', done);
});
});
.on('error', onBabelError))
.pipe(concat('js-tests.js'))
.pipe(gulp.dest('test/javascript'))
- .on('end', done);
+ .on('finish', done);
});
});