gulp-modify
Modify the content of vinyl files with custom callback function.
npm install --save-dev gulp-modify
var gulp = require('gulp');
var modify = require('gulp-modify');
gulp.task('default', function () {
gulp.src('src/app.ext')
.pipe(modify({
fileModifier: function(file, contents) {
return 'modified';
}
}))
.pipe(gulp.dest('dist'));
});
Type: callback
Default: false
Function which gets called with content
of the vinyl file as first parameter.
MIT
Copyright (c) 2014 efa GmbH, Ferdinand Full