gulp-entwine
v1.0.0
Published
Turn your string to string functions into gulp plugins
Downloads
3
Readme
gulp-entwine
Turn your string to string functions into gulp plugins
Usage
Given a function with a single string parameter that returns a string:
const repeat = (input) => {
return input + input;
};
Easily turn it into a gulp plugin using entwine:
const gulp = require('gulp');
const entwine = require('gulp-entwine');
const repeat = require('repeat');
gulp.task('something', () => {
return gulp.src('file.txt')
.pipe(entwine(repeat))
.pipe(gulp.dest('out'));
});
API
entwine(transformer, options)
transformer
- A function with a single string parameter that returns a string.options.pluginName
- Used in the message when an error is emitted. Defaults to 'entwine'.