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
let issue #166
Comments
Easy fix. Will release a new version shortly once I've fixed a couple other issues. |
Thanks! Fixed as of 1.12.14 |
➜ 6to5 --version ES6 code
compiled to
Console output
Expected Console output
I am using the CLI command |
|
@sebmck You are totally right. I am glad that I did not open a new issue and it is an user error. Have a quick question on By default, all Transformers attributes which listed in If I want to disable any of them, I should define an option of If I ONLY want to enable one or more of them, I should use an option of Thanks. |
@mattma Yep, completely correct. Note that both |
@sebmck Awesome. Good to know. Another question while i am playing around, Well, promise it is the last one I comment it here. es6 code
On
My local output with 6to5#1.13.1
Well, Is this a bug in the latest |
I wasn't asking, but this is still good to know :-) |
Sorry! |
@sebmck Cool. The doc has a very brief intro on what is going on but was not clear how to include the polyfill to make is work. By reading the source code, (https://github.com/6to5/6to5/blob/master/polyfill.js), it does include three required things if I am using Gulp-6to5 to compile the code above.
Here is what is inside my
I installed local Thanks. |
@mattma You're executing the polyfill there. If you really want to get the polyfill as a string I guess you could do |
@sebmck I do not think that is what I am looking for. It should have a simpler version, is not it? I do not necessary need to get ployfill as a string. I just want to get the es6 code to compile and works like you have in the
I am currently learning the Thanks for the great support. |
@mattma The REPL pages includes the polyfill via |
@sebmck Sure. that is clear. But if you see my comment ( previous no.4 comment ) with I tried with What is the correct way to include the ployfill? Here is updated
es6 code
after running
It is not included ployfill. Could you have a code example what my |
@mattma You literally just include app.js // I am a file that is going to be ran through 6to5 and then executed
require("6to5/polyfill");
let [a, b] = ["matt", "sam", "aaron"];
console.log(`${a} & ${b}`); // "matt & sam"
You'd include Feel free to enter the gitter room if you need further clarification or support. I'm more than happy to update the docs if there's any ambiguity. |
@sebmck It works as advertised. Thank you very much. Could you update the doc as well? I could benefit many people. I was confused about where to put it since there is no Using I think it should be a default behavior. I do not know story behind it. I may be totally wrong here. Do not be mad at me. In conclusion, thank you for your quick response. |
@mattma Thank you! I'm not willing to include the polyfill automatically in generated code because it's way too fat. It shouldn't be default behaviour because 6to5 aims to replicate syntax features instead of attempting to replicate an entire ES6 environment, although the bundled polyfill achieves this extremely well. |
@sebmck well-said. As a programmer, I totally agreed with you. The polyfill is existed for a reason, otherwise, it should end up in the core. It is not absolutely needed by the general audience. It should end up at |
node: v0.11.14
6to5: 1.12.13
Still trying to break
let
:-)node --harmony
andtraceur
print "inner", as expected, but6to5-node
prints "outer":The text was updated successfully, but these errors were encountered: