Comparing version 6.1.3 to 6.2.0
@@ -84,3 +84,6 @@ var plugin | ||
// Otherwise, throw if anything bad happened | ||
if(err) { throw err; } | ||
if(err) { | ||
bundleStarted = false; | ||
throw err; | ||
} | ||
@@ -91,2 +94,3 @@ // Push the minified src to our proxied stream | ||
bundleStarted = false; | ||
if(typeof bundleCb == 'function') { | ||
@@ -93,0 +97,0 @@ return bundleCb(err, new Buffer(src), map); |
@@ -21,3 +21,3 @@ { | ||
], | ||
"version": "6.1.3", | ||
"version": "6.2.0", | ||
"repository": { | ||
@@ -24,0 +24,0 @@ "type": "git", |
@@ -188,2 +188,23 @@ /* globals jake */ | ||
// this is for Watchify | ||
tests['multiple bundles with the same transform'] = function (next) { | ||
var bundler = new browserify({debug: true}); | ||
bundler.add(fixtures.entryScript('simple file')); | ||
bundler.plugin(require('../lib')); | ||
bundler.bundle(function (err, src, map) { | ||
if(err) { throw err; } | ||
assert.doesNotThrow(function () { | ||
validate(src, map) | ||
}, 'The bundle should have a valid sourcemap'); | ||
bundler.bundle(function (err, src, map) { | ||
if(err) { throw err; } | ||
assert.doesNotThrow(function () { | ||
validate(src, map) | ||
}, 'The bundle should have a valid sourcemap'); | ||
next(); | ||
}); | ||
}); | ||
} | ||
module.exports = tests; |
1734357
29689