-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Use babel for transpiling rather than closure compiler #20879
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13130,7 +13130,6 @@ def check_for_es6(filename, expect): | |
self.assertContained('foo(arg="hello")', js) | ||
self.assertContained(['() => 2', '()=>2'], js) | ||
self.assertContained('const ', js) | ||
self.assertContained('let ', js) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why did this change? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. babel doesn't strip comments by default when transpiling.. and we have comments that contains the string ".. let ..." making this hacky check fail. I think its find to drop it rather than try to get clever here. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I see. sgtm |
||
self.assertContained('?.[', js) | ||
self.assertContained('?.(', js) | ||
self.assertContained('??=', js) | ||
|
@@ -13142,7 +13141,6 @@ def check_for_es6(filename, expect): | |
self.assertNotContained('() => 2', js) | ||
self.assertNotContained('()=>2', js) | ||
self.assertNotContained('const ', js) | ||
self.assertNotContained('let ', js) | ||
self.assertNotContained('??', js) | ||
self.assertNotContained('?.', js) | ||
self.assertNotContained('||=', js) | ||
|
@@ -13162,13 +13160,12 @@ def check_for_es6(filename, expect): | |
self.do_runf('test.c', expected, output_basename='test_old') | ||
check_for_es6('test_old.js', False) | ||
|
||
# If we add `--closure=0` that transpiler (closure) is not run at all | ||
print('with old browser + --closure=0') | ||
self.do_runf('test.c', expected, emcc_args=['--closure=0'], output_basename='test_no_closure') | ||
# If we add `-sPOLYFILL=0` that transpiler is not run at all | ||
print('with old browser + -sPOLYFILL=0') | ||
self.do_runf('test.c', expected, emcc_args=['-sPOLYFILL=0'], output_basename='test_no_closure') | ||
check_for_es6('test_no_closure.js', True) | ||
|
||
# If we use `--closure=1` closure will run in full optimization mode | ||
# and also transpile to ES5 | ||
# Test that transpiling is compatible with `--closure=1` | ||
print('with old browser + --closure=1') | ||
self.do_runf('test.c', expected, emcc_args=['--closure=1'], output_basename='test_closure') | ||
check_for_es6('test_closure.js', False) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The last part seems broken: "canvas size is screen size".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is just a formatting change to the existing changelog entry. I don't want to mess with it as part of this PR really.