Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Perform a few automated ES6 transformations to our prelude #1215

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

Merged
merged 6 commits into from
Jun 27, 2023
Merged

Conversation

flimzy
Copy link
Member

@flimzy flimzy commented Jun 26, 2023

This is done with the help of lebab. More transformations could be done. In particular, by using let and const, instead of var, we can safely do a number of other conversions, however, this tool is not able to safely do the let/const conversion automatically, so we should probably do (or at least validate) that manually.

flimzy added 5 commits June 26, 2023 12:03
> lebab --replace . --transform arg-rest
> lebab --replace . --transform arg-spread
> lebab --replace . --transform arrow
> lebab --replace . --transform obj-method
> lebab --replace . --transform obj-shorthand
@flimzy flimzy changed the title Perform a few automated ES6 transoformations to our prelude Perform a few automated ES6 transformations to our prelude Jun 26, 2023
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

Informed by:

> lebab --replace . --transform default-param

But I only selected the one case that seemed relevant.
@github-actions
Copy link

Reference app: jQuery TodoMVC (acf500a6c32a83d8c4582d967b09a65febf0e120)

BRANCH ORIGINAL MINIFIED COMPRESSED (GZIP)
Pull request (es6) 2,946,717 bytes 1,932,995 bytes 382,918 bytes
Target branch (master) 0.04% decrease (-1,323 bytes) 0.10% decrease (-1,888 bytes) 0.00% increase (2 bytes)

#outputSize

Copy link
Member

@nevkontakte nevkontakte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is neat!

@flimzy flimzy merged commit 781d5dd into master Jun 27, 2023
@flimzy flimzy deleted the es6 branch June 27, 2023 07:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants