Sha256: 68edba72dd698bfc61fd296bb37e10bdf84acf429d2a1e1919dea26e0ab9c7e7
Contents?: true
Size: 547 Bytes
Versions: 3
Compression:
Stored size: 547 Bytes
Contents
var browserify = require('../'); var vm = require('vm'); var test = require('tap').test; var through = require('through'); test('function transform', function (t) { t.plan(3); var b = browserify(__dirname + '/tr/main.js'); b.transform(function (file) { return through(function (buf) { this.queue(String(buf) .replace(/AAA/g, '5') .replace(/BBB/g, '50') ); }) }); b.bundle(function (err, src) { vm.runInNewContext(src, { t: t }); }); });
Version data entries
3 entries across 3 versions & 2 rubygems