ophentis / gulp-insert

string mutation library for gulp

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

gulp-insert

String manipulation library for gulp

Usage

npm install gulp-insert
var insert = require('gulp-insert');

Append

Appends a string onto the contents.

.pipe(insert.append('world')); // Appends 'world' to the contents of every file

Prepend

Appends a string onto the contents.

.pipe(insert.prepend('Hello')); // Prepends 'Hello' to the contents of every file

Wrap

Wraps the contents with two strings.

.pipe(insert.wrap('Hello', 'World')); // prepends 'hello' and appends 'world' to the contents

Transform

Calls a function with the contents of the file.

.pipe(insert.transform(function(contents) {
  return contents.toUpperCase();
}));

About

string mutation library for gulp


Languages

Language:JavaScript 100.0%