1.0.0 • Published 8 years ago

gulp-entwine v1.0.0

Weekly downloads
1
License
MIT
Repository
github
Last release
8 years ago

gulp-entwine

Build Status

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'.