/**
 * Module Dependencies
 */

var path      = require('path');
var transform = require('react-tools').transform;
var through   = require('through');

/**
 * Exports
 */

var Transformers = {};

Transformers.source = transform;

Transformers.browserify = function(file, options) {
  var source  = '';

  return through(function(data) {
    source += data;
  }, function() {
    var result;

    try {
      result = Transformers.source(source, options);
    } catch (error) {
      error.message += ' in "' + file + '"';

      this.emit('error', error);
    }

    this.queue(result);
    this.queue(null);
  });
};

module.exports = Transformers;

@@ -302,23 +302,20 @@
 %0A%0A  
-return through(
+var write = 
 func
@@ -350,17 +350,34 @@
 ata;%0A  %7D
-,
+;%0A%0A  var compile =
  functio
@@ -419,17 +419,19 @@
     
-result = 
+this.queue(
 Tran
@@ -462,16 +462,17 @@
 options)
+)
 ;%0A    %7D 
@@ -576,58 +576,45 @@
   %7D%0A
-%0A
   
-  this.queue(result);%0A    this.queue(null);%0A  %7D
+%7D;%0A%0A  return through(write, compile
 );%0A%7D

Fix browserify transform