diff --git a/lib/6to5/file.js b/lib/6to5/file.js index 751b032255..49b75abd10 100644 --- a/lib/6to5/file.js +++ b/lib/6to5/file.js @@ -80,6 +80,7 @@ File.prototype.addDeclaration = function (name) { File.prototype.parse = function (code) { var self = this; + this.code = code; code = this.parseShebang(code); @@ -103,13 +104,7 @@ File.prototype.generate = function () { var opts = this.opts; var ast = this.ast; - var printOpts = {}; - - if (opts.sourceMap) { - printOpts.sourceMapName = opts.sourceMapName; - } - - var result = generate(ast, printOpts); + var result = generate(this.code, ast, opts); if (this.shebang) { // add back shebang