Created
April 16, 2014 17:35
-
-
Save reu/10911441 to your computer and use it in GitHub Desktop.
Self enclosing function for each file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var es = require("event-stream"); | |
module.exports = function() { | |
return es.map(function(file, callback) { | |
file.contents = new Buffer("(function() {\n" + String(file.contents) + "\n})();"); | |
callback(null, file); | |
}); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment