Compare commits

...

4 Commits

Author SHA1 Message Date
Sebastian McKenzie
6811f071a9 v1.10.3 2014-10-25 17:24:43 +11:00
Sebastian McKenzie
9abda34e59 simplify transform call chain 2014-10-25 17:23:27 +11:00
Sebastian McKenzie
417ba2bd92 disable uglify benchmark 2014-10-25 17:23:14 +11:00
Sebastian McKenzie
e23f8e92ba remove internal transformer check from ensureTransformerNames #94 2014-10-25 17:23:03 +11:00
4 changed files with 7 additions and 8 deletions

View File

@@ -140,9 +140,9 @@ var sizeBenchmark = function (code, loc, name, compiler) {
});
if (!output) return;
go(function () {
return uglify.minify(output, { fromString: true }).code;
}, uglifyTitle);
//go(function () {
// return uglify.minify(output, { fromString: true }).code;
//}, uglifyTitle);
};
//

View File

@@ -84,7 +84,8 @@ File.prototype.parse = function (code) {
code = this.parseShebang(code);
return util.parse(this.opts, code, function (tree) {
return self.transform(tree);
self.transform(tree);
return self.generate();
});
};
@@ -96,8 +97,6 @@ File.prototype.transform = function (ast) {
_.each(transform.transformers, function (transformer) {
transformer.transform(self);
});
return this.generate();
};
File.prototype.generate = function () {

View File

@@ -71,7 +71,7 @@ transform.test = function (task, assert) {
transform._ensureTransformerNames = function (type, keys) {
_.each(keys, function (key) {
if (key[0] === "_" || !_.has(transform.transformers, key)) {
if (!_.has(transform.transformers, key)) {
throw new ReferenceError("unknown transformer " + key + " specified in " + type);
}
});

View File

@@ -1,7 +1,7 @@
{
"name": "6to5",
"description": "Turn ES6 code into readable vanilla ES5 with source maps",
"version": "1.10.2",
"version": "1.10.3",
"author": "Sebastian McKenzie <sebmck@gmail.com>",
"homepage": "https://github.com/sebmck/6to5",
"repository": {