We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is there way to pass parameters to performChange function from task. Such that
performChange
function performChange(content, someFlag) { return content.replace(/foo/g, someFlag); } gulp.task('change', function() { return gulp.src('src/*.html') .pipe(change(performChange)) // pass someFlag HOW? .pipe(gulp.dest('build/')) });
The text was updated successfully, but these errors were encountered:
Here's one way you could achieve the same result:
function performChange(someFlag) { return function (content) { return content.replace(/foo/g, someFlag); } } gulp.task('change', function() { return gulp.src('src/*.html') .pipe(change(performChange('replace_text'))) .pipe(gulp.dest('build/')) });
Sorry, something went wrong.
No branches or pull requests
Is there way to pass parameters to
performChange
function from task. Such thatThe text was updated successfully, but these errors were encountered: