gulp-modify
v0.1.1
Published
Modify the content of vinyl files with custom callback function.
Downloads
4,631
Readme
gulp-modify
Modify the content of vinyl files with custom callback function.
Install
npm install --save-dev gulp-modify
Example
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'));
});
API
modify(options)
options.fileModifier
Type: callback
Default: false
Function which gets called with content
of the vinyl file as first parameter.
License
MIT
Copyright (c) 2014 efa GmbH, Ferdinand Full