Fix sample code in README.md

This commit is contained in:
ulrichb 2018-12-08 18:57:10 +00:00
parent c39a4a6cb0
commit 54b80098d2

View File

@ -35,8 +35,8 @@ let myAsyncFunction = async (file, enc) => {
gulp.task("gulpTest", function() { gulp.task("gulpTest", function() {
let stream = gulp let stream = gulp
.src("./mydir/*.something") .src("./mydir/*.something")
.pipe(gulpFunction(myFunction, "forEach")) //read the notes below .pipe(gulpFunction(myAsyncFunction, "forEach")) //read the notes below
// .pipe(forEach(myFunction)) // if imported as >> import { forEach } from 'gulp-function' << // .pipe(forEach(myAsyncFunction)) // if imported as >> import { forEach } from 'gulp-function' <<
.pipe(gulp.dest("./build/")); .pipe(gulp.dest("./build/"));
return stream; // by returning the stream gulp knows when our task has finished. return stream; // by returning the stream gulp knows when our task has finished.
}); });