Skip to content
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

--target es5 enables es6 class getters and setters #27

Merged

Conversation

luigy
Copy link
Contributor

@luigy luigy commented Nov 6, 2014

es5 compatibility is already assumed for some of the harmony transforms so this shouldn't affect any previous behavior

es6 class getters and setters require es5 as target
activate them with new option: --target es5

options.harmony || options.es6 ?
visitors.getAllVisitors() :
visitors.transformVisitors.react);
var transformOptions = {}, transformVisitors;
Copy link
Owner

Choose a reason for hiding this comment

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

Can we have those var definitions on different lines as separate declarations?

@andreypopp
Copy link
Owner

I'd better introduce es5 option: --es5 or --target es5.

@luigy
Copy link
Contributor Author

luigy commented Nov 11, 2014

I think I remember seeing that harmony transforms in jstransform already assume a target of es5?

I prefer --target es5 more over es5. I don't think it would look nice to have {es5: true, es6: true}

@andreypopp
Copy link
Owner

@luigy you're right about --target es5. I don't see that jstransform automatically assume es5 target when harmony is enabled.

@luigy luigy force-pushed the enable-es6-class-getters-and-setters branch from e495a4f to 45e8070 Compare November 11, 2014 19:07
@luigy luigy changed the title enable es6 class getters and setters when harmony transformations are activated --target es5 enables es6 class getters and setters Nov 11, 2014
@luigy
Copy link
Contributor Author

luigy commented Nov 11, 2014

@andreypopp you're right es5 is not targeted for harmony. I updated the PR

andreypopp added a commit that referenced this pull request Nov 12, 2014
`--target es5` enables es6 class getters and setters
@andreypopp andreypopp merged commit eb2cdfc into andreypopp:master Nov 12, 2014
@andreypopp
Copy link
Owner

Thanks merged!

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.

None yet

2 participants