simplify bin/6to5 util methods and fix double compilation bug with eval in 6to5-node

This commit is contained in:
Sebastian McKenzie
2014-10-18 15:46:15 +11:00
parent 435cd98480
commit 2be2e4e1ae
4 changed files with 9 additions and 11 deletions

View File

@@ -41,9 +41,7 @@ var _eval = function (code, filename) {
};
if (commander.eval) {
var code = to5.transform(commander.eval, { filename: "eval" }).code;
var result = _eval(code, "eval");
var result = _eval(commander.eval, "eval");
if (commander.print) console.log(result);
} else {
var filenames = commander.args;