Closed ozanmakes closed 7 years ago
Any comment on this?
That would be great to have, ES6 brings a lot of important new features but minification of all of them is still needed.
+1
+1
:+1:
+1
:+1: just got bit by for...of
.
If harmony support were enabled, we could also safely convert functions that don't use this
to use the =>
syntax as well.
+1 -- I'm writing a game for future browsers so I don't want to add the overhead of traceur to my code.
I also think converting functions to arrows when this
is not used would be pretty nice.
Adding harmony support on my fork, https://github.com/fabiosantoscode/UglifyJS2/tree/harmony little by little, to later pull request that back to this project.
Got arrow functions working so far (I think).
@fabiosantoscode Awesome! It would be super cool if you could submit separate new language features as separate pull requests. That will make reviewing them a lot easier. :)
Okay, I'll restructure my commit history to do just that.
I'm writing some tests for the parser, and am thinking of doing so for the output as well, is that okay?
That is certainly okay! Related tasks: #337, #410.
:+1: bump.
:+1:
:+1:
:+1:
I hope everyone knows how to find technical information about ecmascript 6 / ecmascript 2015
Some examples:
Note: understanding the structure of the spec, instead of reading it may be more important long term, so its easy to find information about specific items of the spec.
Good luck
+1
:+1:
:+1:
Please, everyone, don't comment with a 👍 or a +1: they add nothing to the discussion and will only antagonize people who have expressed their interest The Right Way™: with the subscribe button.
Like most clearly expressed priority of issue You can even sort by "Most commented"
@plestik Adding a vote for support is always in the best interest of a project and is how it has been done for decades. ES6 syntax is something that this project should support to maintain high standards of quality. I am also subscribed to this thread. As you can see by the community outreach there is a strong interest and it should be taken seriously not complained about. :)
Maybe we should start with this question as we can all learn things from each other:
What is your favorite es6 feature?
Those who want to experiment with es6 can do it here: https://iojs.org/en/es6.html
It's basically a fork of node with many es6 features enabled by default.
What is your favorite es6 feature?
Block level scoping with let
statement versus var
is a plus. This is the most common entry syntax for ES6.
I have to agree with @Martii; let
will be a huge plus for temporary loop variables.
What is your favorite es6 feature?
generators ftw! co + generators + promises ♡
@artin-phares Awesome!
:+1:
:+1:
I'm curious if there's some sort of status page tracking which ES6 features are yet implemented. Like this, over at Esprima.
That would be handy not only for the UglifyJS developers, but also for other developers who use this library to minify their code.
On 13/07/2015 02:33am, arackaf wrote:
I'm curious if there's some sort of status page tracking which ES6 features are yet implemented. Like this, over at Esprima.
jquery/esprima#1099 https://github.com/jquery/esprima/issues/1099
— Reply to this email directly or view it on GitHub https://github.com/mishoo/UglifyJS2/issues/448#issuecomment-120780583.
+1.. At least add the let and const tags as they should act the same as "var", and in the future you could make the let tag name change on every block
Note ECMAScript 6th Edition (ES6 a.k.a Harmony) was finalized relatively recently last month.
See also:
What is your favorite es6 feature?
Please add support for classes and let
!
By the way for anybody reading this, just use Babel.io before you use Uglify, it would work
use Babel.io before you use Uglify, it would work
This prevents browsers from using their own optimized ES6 implementations; over time it will get faster than transpiled ES5 output. Also, this forces even good, modern browsers to download a lot of polyfills.
ES6 support in a JavaScript minifier is needed. It will get more & more needed in the future.
also, some ES6 code, like arrow functions, is more concise than ES5, so a modern minifier should be converting ES5 to ES6 for optimal compression
@probins I started work on that, but it currently depends on my pull request for arrow functions being accepted.
I started work on that, but it currently depends on my pull request for arrow functions being accepted.
Could you point me to that PR? I can't seem to find it?
I didn't create it yet after all, it was dependent on whether my other pull request was accepted. I'll send it soon
@mzgol Atleast it works for now, I don't really see this feature getting added to Uglify soon
@rvanvelzen when is the next release planned? Can't wait to use arrow functions with uglify :smile:
It would be great to see "beta" support of ES6 coming out so people can report any issues in our implementation of it before we finish all the features.
@fabiosantoscode +1
@fabiosantoscode Do you have any list of anticipated features?
@fabiosantoscode Beta releases sound good. I think that the github release system lets you mark a release as a pre-release - perhaps that would work?
I'm trying to use the excellent livenode with a project which uses ES6 features introduced in node v11, but unfortunately UglifyJS's parser chokes when it encounters a
let
statement or a generator function (function *() { yield true }
).