Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0e6bd3ed08 | ||
|
|
95a3a02469 | ||
|
|
1a0cad2ac1 | ||
|
|
fe594dfe0c | ||
|
|
4fe6ad43c1 | ||
|
|
738203485c | ||
|
|
5218d07b0d |
5
Makefile
5
Makefile
@@ -65,7 +65,10 @@ test-browser:
|
||||
node $(BROWSERIFY_CMD) -e test/_browser.js >dist/6to5-test.js
|
||||
rm -rf templates.json tests.json
|
||||
|
||||
test -n "`which open`" && open test/browser.html
|
||||
if [ -n $$BROWSER ]; then $$BROWSER test/browser.html; \
|
||||
elif which xdg-open > /dev/null; then xdg-open 'test/browser.html'; \
|
||||
elif which gnome-open > /dev/null; then gnome-open 'test/browser.html'; \
|
||||
elif which open > /dev/null; then open 'test/browser.html'; fi \
|
||||
|
||||
publish:
|
||||
git pull --rebase
|
||||
|
||||
@@ -151,8 +151,10 @@ exports.ConditionalExpression = function (node, parent) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (t.isCallExpression(parent) && parent.callee === node) {
|
||||
return true;
|
||||
if (t.isCallExpression(parent) || t.isNewExpression(parent)) {
|
||||
if (parent.callee === node) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
if (t.isConditionalExpression(parent) && parent.test === node) {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "6to5",
|
||||
"description": "Turn ES6 code into readable vanilla ES5 with source maps",
|
||||
"version": "2.13.5",
|
||||
"version": "2.13.6",
|
||||
"author": "Sebastian McKenzie <sebmck@gmail.com>",
|
||||
"homepage": "https://6to5.org/",
|
||||
"repository": "6to5/6to5",
|
||||
|
||||
11
test/fixtures/transformation/es6-let-scoping/.switch-break/exec.js
vendored
Normal file
11
test/fixtures/transformation/es6-let-scoping/.switch-break/exec.js
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
if (true) {
|
||||
const x = 1;
|
||||
switch (x) {
|
||||
case 1: {
|
||||
function y() {
|
||||
assert(x, 1);
|
||||
};
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user