var _ = require('underscore');
var async = require('async');
var config = require('./config');
var fs = require('fs');
var mkdirp = require('mkdirp');
var path = require('path');

var pruneManifest = function (manifest) {
  return _.reduce(manifest, function (manifest, val, key) {
    if (key === '__VERSION__' || key === '__IN__') {
      manifest[key] = val;
    } else if (val.targetPaths && val.hash) {
      manifest[key] = _.omit(val, 'buffer');
    }
    return manifest;
  }, {});
};

module.exports = function (cb) {
  var manifestPath = config.get().manifestPath;
  if (!manifestPath) return cb();
  async.series([
    _.partial(mkdirp, path.dirname(manifestPath)),
    _.partial(
      fs.writeFile,
      manifestPath,
      JSON.stringify(pruneManifest(config.get().manifest))
    )
  ], cb);
};

@@ -173,16 +173,80 @@
 ath');%0A%0A
+var META_KEYS = %5B'__VERSION__', '__IN__', '__TRANSFORMERS__'%5D;%0A%0A
 var prun
@@ -351,49 +351,33 @@
 if (
-key === '__VERSION__' %7C%7C key === '__IN__'
+_.include(META_KEYS, key)
 ) %7B%0A

Add __TRANSFORMERS__ to special keys