2.0.0 • Published 6 years ago

bundl-replace v2.0.0

Weekly downloads
4
License
MIT
Repository
github
Last release
6 years ago

bundl-replace

Replace strings within your bundles

Runs with the amazing Bundl build tool

Install

$ npm install --save-dev bundl-replace

Use

var Bundl = require('bundl');
var write = require('bundl-write');
var replace = require('bundl-replace');

new Bundl(targets)
    .then(replace(pattern, replacement))
    .then(write())
    .go();

Arguments

Behave like String.prototype.replace with the exception that String patterns are replaced globally

Direct Replace

Sometimes it is desirable to do a direct string replace without converting to a RegEx. Note: this only replaces the first occurrence.

var Bundl = require('bundl');
var write = require('bundl-write');
var replace = require('bundl-replace');

new Bundl(targets)
    .then(replace.direct('(function(foo){', '(function(bar){'))
    .then(write())
    .go();
2.0.0

6 years ago

1.1.0

7 years ago

1.0.0

7 years ago