String manipulation library for gulp
npm install gulp-insert
var insert = require('gulp-insert');
Appends a string onto the contents.
.pipe(insert.append('world')); // Appends 'world' to the contents of every file
Appends a string onto the contents.
.pipe(insert.prepend('Hello')); // Prepends 'Hello' to the contents of every file
Wraps the contents with two strings.
.pipe(insert.wrap('Hello', 'World')); // prepends 'hello' and appends 'world' to the contents
Calls a function with the contents of the file.
.pipe(insert.transform(function(contents) {
return contents.toUpperCase();
}));