Compare commits

...

3 Commits

Author SHA1 Message Date
Sebastian McKenzie
4ce38eab37 v1.10.5 2014-10-28 10:59:28 +11:00
Sebastian McKenzie
0a7ce115ff remove browser.js in make publish 2014-10-28 10:58:29 +11:00
Sebastian McKenzie
21ed438fd8 alias functions in scope call wrapping - fixes #99 2014-10-28 10:58:20 +11:00
3 changed files with 6 additions and 4 deletions

View File

@@ -57,4 +57,4 @@ publish:
git push --follow-tags
rm -rf templates.json
rm -rf templates.json browser.js

View File

@@ -42,9 +42,11 @@ exports.VariableDeclaration = function (node, parent, file) {
if (node.type === "FunctionDeclaration") {
throw new Error("`FunctionDeclaration`s that use `let` and `constant` references aren't allowed outside of the root scope");
} else {
return b.callExpression(b.functionExpression(null, letReferences, b.blockStatement([
var func = b.functionExpression(null, letReferences, b.blockStatement([
b.returnStatement(node)
])), letReferences);
]));
func._aliasFunction = true;
return b.callExpression(func, letReferences);
}
} else {
return false;

View File

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