index.js
function middleware(file, options) {
  var matcher = new RegExp("\\.(?:"+ middleware.extensions.join("|")+")$")
  if (!matcher.test(file)) return through();

  var input = '';
  var write = function (buffer) {
    input += buffer;
  }

  var end = function () {
    this.queue(createModule(input, options));
    this.queue(null);
  }

  return through(write, end);

}
function middleware(file, options) {
  var matcher = new RegExp("\\.(?:"+ middleware.extensions.join("|")+")$")
  if (!matcher.test(file)) return through();

  var input = '';
  var write = function (buffer) {
    input += buffer;
  }

  var end = function () {
    this.queue(createModule(input, options));
    this.queue(null);
  }

  return through(write, end);

}
create middleware for handling shader files