Skip to content

Use ECMAScript 5 by default - #21

Merged
jashkenas merged 1 commit into
documentcloud:masterfrom
rykov:es5
Dec 11, 2012
Merged

jashkenas merged 1 commit into
documentcloud:masterfrom
rykov:es5

Conversation

@rykov

@rykov rykov commented Jun 6, 2012

Copy link
Copy Markdown
Contributor

All modern browsers use ES5 as their standard, and it often causes confusion when Javascript files fail to compress, but work in the browser. I often run into this roadblock when using the Rails Asset Pipeline in development mode (no compression) vs precompiling (with compression).

This change makes ES5 the default compression.

@doxavore

Copy link
Copy Markdown

👍 This would be a nice thing to merge.

@rykov

rykov commented Dec 10, 2012

Copy link
Copy Markdown
Contributor Author

I just got bit by this again as well. Please merge or advise

@jashkenas

Copy link
Copy Markdown
Member

Will do -- but before I do ... what exactly is the change that this makes? Also, if you rebase it, I can merge cleanly.

@caseywebdev

Copy link
Copy Markdown

Stuff like

var arr = [1, 2,];
var obj = {a: 1, b: 2,};

will not compile without setting language/language_in to ECMASCRIPT5. This is annoying for third party scripts that have trailing commas. Other nuances too probably...

@rykov

rykov commented Dec 11, 2012

Copy link
Copy Markdown
Contributor Author

My issue is hard errors on terms that were reserved in EMCA 3 (the current default), but released in EMCA 5. Ember.js uses volatile as a function name, which works fine in all browsers but causes errors in closure-compiler

@jashkenas

Copy link
Copy Markdown
Member

Mind rebasing so I can merge cleanly?

@rykov

rykov commented Dec 11, 2012

Copy link
Copy Markdown
Contributor Author

Putting it together now

On Tue, Dec 11, 2012 at 10:20 AM, Jeremy Ashkenas
notifications@github.comwrote:

Mind rebasing so I can merge cleanly?

—
Reply to this email directly or view it on GitHubhttps://github.com//pull/21#issuecomment-11255462.

@rykov

rykov commented Dec 11, 2012

Copy link
Copy Markdown
Contributor Author

Ok - it's ready.

jashkenas added a commit that referenced this pull request Dec 11, 2012
Use ECMAScript 5 by default
@jashkenas
jashkenas merged commit 735a206 into documentcloud:master Dec 11, 2012
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.

4 participants