TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Deploying ECMAScript 6

80 pointsby ofabout 10 years ago

10 comments

joshstrangeabout 10 years ago
I know I&#x27;m far from the only one but I just wanted to throw out there that my company is now using babel to transpile our ES6 to ES5. The conversion (which only touched the code we&#x27;ve written in the last year or so b&#x2F;c the old code is just spaghetti so we only converted what was already JS &quot;classes&quot;) took less than a week of 1 dev&#x27;s time and has been flawless so far (been using it production for a little over a month now). We are using gulp to facilitate this process. Just wanted to add a data point to those considering using it.<p>I&#x27;ve found the JS to be much cleaner and easier to read and I&#x27;ve heard similar statements from the rest of the dev team. I highly recommend it. The best part is you can convert your code 1 file (or &quot;class&quot;) at a time and your old JS will still continue to work perfectly.<p>Feel free to ask me any questions about the process and any potential issues and I can respond with how we dealt with it (if we did).
评论 #9414933 未加载
评论 #9415927 未加载
Someone1234about 10 years ago
Wow Spartan (IE replacement) is really kicking some major ass with its ECMAScript 6 support:<p><a href="https:&#x2F;&#x2F;kangax.github.io&#x2F;compat-table&#x2F;es6&#x2F;" rel="nofollow">https:&#x2F;&#x2F;kangax.github.io&#x2F;compat-table&#x2F;es6&#x2F;</a>
评论 #9415400 未加载
评论 #9415395 未加载
thejameskyleabout 10 years ago
Babel contributor here. It&#x27;s great to hear how many people are already deploying projects using Babel, and even better to see how fast ES6 is getting adopted. Many people are still stuck in an ES3 world... (<i>shakes head</i>)<p>If anyone has any questions, feel free to ping me or stop by our support chat[1].<p>[1] <a href="https:&#x2F;&#x2F;gitter.im&#x2F;babel&#x2F;babel" rel="nofollow">https:&#x2F;&#x2F;gitter.im&#x2F;babel&#x2F;babel</a>
评论 #9416417 未加载
apaprockiabout 10 years ago
This states TypeScript is layered on top of ES6. I did not believe that to be true. Is there some meta-bug or other location tracking the TypeScript move to ES6? I was under the impression there were still a number of bugs that prevent fully using TS with ES6. (Maybe I&#x27;m wrong and someone can fill me in :))
评论 #9414784 未加载
评论 #9414398 未加载
评论 #9415820 未加载
评论 #9414904 未加载
jsprogrammerabout 10 years ago
If you&#x27;re looking for a ready-made template project to try out ECMAScript 6&#x2F;7&#x2F;2015, I created, and have been successfully using my base-node [0] and base-angular [1] projects for a while now.<p>You can use babel or traceur (just comment&#x2F;uncomment one line), although the default is traceur. Gulp is used for building, packaging, and lint&#x2F;transpile on save. base-node contains everything to package your application into a minimal Docker container (&lt;10MB compressed + your minified, transpiled code) with io.js. base-angular will give you a module system, LESS transpiling, live-reload (LESS&#x2F;CSS changes are injected without reload), and a minified, cache-busted output that you can drop into any web server (minimal nginix containerization in the works).<p>I&#x27;m sure the documentation could be better, but the Readme.md has enough to get you started and the code should be very straight-forward.<p>Since I&#x27;m using git, I can set these master repos as the &#x27;upstream&#x27; and whenever I make changes to the base project (like, adding containerization support) I can easily push that change out to all my projects and everything gets tracked nicely in the revision graph. The `create.sh` script in base-node will actually do that rewiring for you.<p>[0] <a href="https:&#x2F;&#x2F;github.com&#x2F;blakelapierre&#x2F;base-node" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;blakelapierre&#x2F;base-node</a><p>[1] <a href="https:&#x2F;&#x2F;github.com&#x2F;blakelapierre&#x2F;base-angular" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;blakelapierre&#x2F;base-angular</a>
BinaryIdiotabout 10 years ago
Not a fan of transpiling; you go from having one language to having to understand two (ish; ES6 isn&#x27;t entirely different) while only being able to debug in one. It&#x27;s nice people can write in and actually use ES6 today but I really don&#x27;t think transpiling is worth it. I&#x27;ve been bitten by weird bugs in transpilers before that wasted far too much of my time.<p>&gt; npm may eventually support two versions of the same module, which would enable you to deliver libraries as both ES5 and ES6 for Node.js, io.js and client-side module systems that are based on npm.<p>No, please no. Why would I ever want to deliver a library in both modes just for some better &#x2F; different syntax? Yes ES6 is nicer than ES5 but doubling the modules isn&#x27;t worth it at all.
评论 #9415536 未加载
评论 #9416429 未加载
评论 #9415981 未加载
评论 #9415449 未加载
z3t4about 10 years ago
Switching from writing classes in other languages to using the JS prototype made writing object oriented code more fun and much faster! The prototype way was a step forward. I think it&#x27;s very weird that JavaScript is now planning to introduce classes, and that you guys are so exited about it.
评论 #9416170 未加载
kmfrkabout 10 years ago
If I just want to clean up some basic code in a .html file with a terminal script - preferably with a &quot;--watch&quot; flag, what&#x27;s the simplest way of accomplishing that?<p>Also seems like the best way to ease into it.
评论 #9415166 未加载
liviuabout 10 years ago
It&#x27;s a pleasure for me to use webpack with Babel for my projects.
fiboabout 10 years ago
to transpile is not an happy idea