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

Harmony support #448

Closed
ozanmakes opened this issue Mar 12, 2014 · 359 comments
Closed

Harmony support #448

ozanmakes opened this issue Mar 12, 2014 · 359 comments
Labels

Comments

@ozanmakes
Copy link

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 }).

@kevyworks
Copy link

Any comment on this?

@mgol
Copy link
Contributor

mgol commented Jul 17, 2014

That would be great to have, ES6 brings a lot of important new features but minification of all of them is still needed.

@Martii
Copy link
Contributor

Martii commented Nov 21, 2014

+1

@maranomynet
Copy link

+1

@darky
Copy link

darky commented Dec 26, 2014

👍

@ben-eb
Copy link

ben-eb commented Jan 4, 2015

+1

@kevinjalbert
Copy link

👍 just got bit by for...of.

@ghost
Copy link

ghost commented Jan 10, 2015

If harmony support were enabled, we could also safely convert functions that don't use this to use the => syntax as well.

@fabiosantoscode
Copy link
Contributor

+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.

@fabiosantoscode
Copy link
Contributor

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).

@rvanvelzen
Copy link
Collaborator

@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. :)

@fabiosantoscode
Copy link
Contributor

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?

@rvanvelzen
Copy link
Collaborator

That is certainly okay! Related tasks: #337, #410.

@19h
Copy link

19h commented Feb 8, 2015

👍 bump.

@simonzack
Copy link

👍

@RamIdeas
Copy link

👍

1 similar comment
@lewispham
Copy link

👍

@avdg
Copy link
Contributor

avdg commented Apr 27, 2015

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

@niemyjski
Copy link

+1

@f0rmat1k
Copy link

👍

@mgol
Copy link
Contributor

mgol commented May 9, 2017

@hamosapience you made a typo in the message; it says "depreceted" instead of "deprecated". Also, it directs people to uglify-js which is the stable version that doesn't understand ES6. It'd be better to mention uglify-es.

@Martii
Copy link
Contributor

Martii commented May 10, 2017

@alexlamsl

Re current README.md currently states npm install uglify-js -g which doesn't seem completely synonymous with:

harmony branch will now be published on https://www.npmjs.com/package/uglify-es

So which npmjs.com source is correct... https://www.npmjs.com/package/uglify-es or https://www.npmjs.com/package/uglify-js ?? e.g. they both point to uglify-js for npm installation... which can be confusing to newer users.

Thanks for the look.

@graingert
Copy link

@Martii both are correct, uglify-es is the Harmony branch, and uglify-js is the master branch

@Martii
Copy link
Contributor

Martii commented May 10, 2017

@graingert
So the https://www.npmjs.com/package/uglify-es page at npmjs.com is reading the master here on GH then... since it says to install with npm install uglify-js -g e.g. it should say npm install uglify-es -g.


Should be...

... but is currently ...

Cc: @isaacs ... is there a way to have npmjs.com read the harmony branch README.md correctly? Thanks for the visit in advance.

@alexlamsl
Copy link
Collaborator

Documentation for uglify-es has been updated for 3.0.3, which is yet to be published on npm pending green light from Travis.

@sbrl
Copy link

sbrl commented May 10, 2017

Suggestion: Set up Gitter for general discussion if you haven't already, and then put a link in the README to it.

@Polve
Copy link

Polve commented May 29, 2017

I'm unable to understand how to correctly integrate uglify-es with the usual ember build pipeline: a few weeks ago I just had to add the dependency "uglify-js": "git://github.com/mishoo/UglifyJS2#harmony" but this not work any more.

I tried removing ember-cli-uglify and depending instead by ember-cli-uglify-es but this not seems to work too.

Can anyone please give me an hint?

@avdg
Copy link
Contributor

avdg commented May 29, 2017

Note that the api has been changed on harmony because of the breaking changes. This is done as preparation for uglifyJS v3.

@fritx
Copy link

fritx commented May 30, 2017

@Polve if you're using webpack@1 and mishoo/UglifyJS2#harmony and have met the uglify-es problem, then you must be in the same trouble as I was.

You could try my fork of webpack and re-install, it would help.
https://github.com/fritx/webpack/tree/1.x-harmony
as mentioned here #448 (comment)

npm i -D "git+https://github.com/fritx/webpack.git#1.x-harmony"

This fork is including uglify-js < 3, and can work well.

fritx referenced this issue in we-fork/webpack May 30, 2017
uglify-js#harmony was officially renamed to uglify-es,
causing this repo not working.
fritx referenced this issue in we-fork/webpack May 30, 2017
locked to harmony-lagacy branch in version 2.x
@Polve
Copy link

Polve commented Jun 13, 2017

I'm not using webpack, and I'm still stuck, unable to create a production build :-(

@kzc
Copy link
Contributor

kzc commented Jun 13, 2017

I'm not a webpack user, but you could try:

https://github.com/noBlubb/uglify-es-webpack-plugin

@tetreault
Copy link

In comparison Sputnik 1 was pretty much designed in 3 years and launched if Wikipedia isn't lying to me.

@isaacs
Copy link

isaacs commented Jun 17, 2017

Hey. npm doesn't read the readme.md file from GitHub. It reads the local file at publish time. To change it, publish a new version.

@alexlamsl
Copy link
Collaborator

@isaacs thanks for the confirmation. I believe this has been taken care of in #448 (comment)

@Martii
Copy link
Contributor

Martii commented Jun 17, 2017

npm doesn't read the readme.md file from GitHub. It reads the local file at publish time.

That explains a bit. Thanks.

@bahmutskyi
Copy link

Does someone know how to integrate uglify-es in grunt project?

@ghost
Copy link

ghost commented Jun 30, 2017

Sounds like a great question for stack overflow

@alexlamsl
Copy link
Collaborator

@BagMA use the harmony branch of grunt-contrib-uglify:
https://github.com/gruntjs/grunt-contrib-uglify/tree/harmony

@kzc
Copy link
Contributor

kzc commented Jun 30, 2017

use the harmony branch of grunt-contrib-uglify:
https://github.com/gruntjs/grunt-contrib-uglify/tree/harmony

Is there an official grunt-contrib-uglify npm package for uglify-es?

@ghost
Copy link

ghost commented Jun 30, 2017

RTFM

@kzc
Copy link
Contributor

kzc commented Jun 30, 2017

@alexlamsl Since uglify-es has been released as the npm package for the uglify harmony branch, can this thread be closed to comments?

@alexlamsl
Copy link
Collaborator

@kzc sure thing 👍

Repository owner locked and limited conversation to collaborators Jun 30, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests