Skip to content

Turn your string to string functions into gulp plugins

License

Notifications You must be signed in to change notification settings

hodavidhara/gulp-entwine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Turn your string to string functions into gulp plugins

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published