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
osener opened this issue Mar 12, 2014 · 359 comments
Closed

Harmony support #448

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

Comments

@osener
Copy link

@osener osener commented Mar 12, 2014

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

@kevyworks kevyworks commented Apr 4, 2014

Any comment on this?

@mgol
Copy link
Contributor

@mgol 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 Martii commented Nov 21, 2014

+1

@maranomynet
Copy link

@maranomynet maranomynet commented Dec 11, 2014

+1

@darky
Copy link

@darky darky commented Dec 26, 2014

👍

@ben-eb
Copy link

@ben-eb ben-eb commented Jan 4, 2015

+1

@kevinjalbert
Copy link

@kevinjalbert kevinjalbert commented Jan 8, 2015

👍 just got bit by for...of.

@ghost
Copy link

@ghost 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

@fabiosantoscode fabiosantoscode commented Jan 11, 2015

+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

@fabiosantoscode fabiosantoscode commented Jan 11, 2015

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

@rvanvelzen rvanvelzen commented Jan 14, 2015

@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

@fabiosantoscode fabiosantoscode commented Jan 14, 2015

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

@rvanvelzen rvanvelzen commented Jan 14, 2015

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

@19h
Copy link

@19h 19h commented Feb 8, 2015

👍 bump.

@simonzack
Copy link

@simonzack simonzack commented Mar 5, 2015

👍

@RamIdeas
Copy link

@RamIdeas RamIdeas commented Apr 26, 2015

👍

1 similar comment
@lewispham
Copy link

@lewispham lewispham commented Apr 26, 2015

👍

@avdg
Copy link
Contributor

@avdg 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

@niemyjski niemyjski commented Apr 30, 2015

+1

@f0rmat1k
Copy link

@f0rmat1k f0rmat1k commented May 11, 2015

👍

@mgol
Copy link
Contributor

@mgol 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 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

@graingert graingert commented May 10, 2017

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

@Martii
Copy link
Contributor

@Martii 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

@alexlamsl alexlamsl commented May 10, 2017

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

@Polve 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 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

@tetreault tetreault commented Jun 17, 2017

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

@isaacs
Copy link

@isaacs 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

@alexlamsl alexlamsl commented Jun 17, 2017

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

@Martii
Copy link
Contributor

@Martii 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.

@Bagma
Copy link

@Bagma Bagma commented Jun 30, 2017

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

@ghost
Copy link

@ghost ghost commented Jun 30, 2017

Sounds like a great question for stack overflow

@alexlamsl
Copy link
Collaborator

@alexlamsl alexlamsl commented Jun 30, 2017

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

@kzc
Copy link
Contributor

@kzc 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 ghost commented Jun 30, 2017

RTFM

@kzc
Copy link
Contributor

@kzc 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

@alexlamsl alexlamsl commented Jun 30, 2017

@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.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
You can’t perform that action at this time.