Skip to main content

6to5 + esnext

· 5 min read

过去几个月对 6to5 来说非常令人兴奋。我们从一个教育项目发展到在 npm 上有 10 万次下载,已经有 1,800 次提交和 155 个版本发布,现在支持所有主要的 JavaScript 构建系统,最近我们还成为了 Sprockets 4.0 的默认工具。更棒的是,我们的新网站和文档收获了数万次浏览量,还被包括 JavaScript Weekly 在内的多家发布物报道。

🌐 The past few months have been exciting for 6to5. We’ve gone from being an educational project to having 100k downloads on npm, there’s been 1,800 commits and 155 releases, we now support every major JavaScript build system, and recently we became a Sprockets 4.0 default. To top it off, our new website and documentation received tens of thousands of pageviews, and has been featured by several publications including JavaScript Weekly.

npm downloads of 6to5, traceur, and esnext

(来源:npm,包括5天移动平均点)

我们才刚刚开始…

🌐 And we’re just getting started...

6to5 的使命是将未来版本的 JavaScript 编译成符合规范、性能优良且易读的 JavaScript 文件,让你今天就能运行。6to5 内置支持 JSX 和 Flow 类型,比其他转译器提供的功能要多得多。

我们的首要任务是消除任何阻碍 ES6+ 采用的障碍,虽然 6to5 可能是目前功能最齐全的 ES6 转译器,但还有其他很棒的项目也在尝试做同样的事情。Traceur Compiler 是我们编译器最常见的替代品,但它也是差异最大的一种,因为它非常依赖运行时。其他与 6to5 方法类似的替代方案包括:es6-transpiler、es6now、jstransform 和 esnext。

🌐 Our top priority is eliminating any barriers to ES6+ adoption, and while 6to5 may be the most feature-ready ES6 transpiler out there right now, there are other great projects attempting to do the same. Traceur Compiler is the most common alternative to our compiler, but it’s also the most different since it relies heavily on a runtime. Other alternatives with similar approach to 6to5 include: es6-transpiler, es6now, jstransform, and esnext.

esnext 在目标上最接近 6to5。它专注于创建一个更智能的转换器,可以生成更高质量的 ES5 兼容输出。这两个项目都很容易上手,而且都非常重视为开发者打造最好的工具。

🌐 esnext is the closest 6to5 in it’s aim. With a focus on creating a smarter transpiler that can create higher quality ES5-compatible output, both projects are easy to get started with, and both care deeply about creating the best tool for developers.

几周前,Stefan Penner 联系了我们,希望因为我们有相同的使命,我们可以联合我们的努力。对这个想法感到兴奋,我们很快就安排了一次会议来讨论这可能意味着什么。

🌐 A few weeks back, Stefan Penner reached out to us hoping that, because we share the same mission, we might be able to unite our efforts. Excited by the idea, we quickly scheduled a meeting to discuss what that might mean.

会议进行得很顺利:

🌐 The meeting went well:

我们决定,因为我们有共同的目标和理念,把两个项目合并起来,共同努力打造一个更好的转译器,这样做很有意义。

🌐 We’ve decided that because of our shared goals and philosophy it makes sense to merge the two projects in an effort to build a better transpiler.

那这对两个项目意味着什么呢?

🌐 So what will this mean for both projects?

esnext 团队将开始着手 6to5 的工作,带来他们的技能和经验,使其更快并且更符合规范。在我们这边,我们将把人从 esnext 转移到 6to5——我们已经把所有 esnext 的测试移植到 6to5,以确保不会出问题。

🌐 The esnext team will start work on 6to5 bringing their skillset and experience to make it faster and more spec-compliant. On our end, we will be migrating people from esnext to 6to5—we’ve already ported all of the esnext tests to 6to5 to ensure nothing will break.

Ember CLI 用户(目前使用 esnext)可以预期 6to5 会默认安装,取代 esnext。

你可以期待我们在 6to5 上的持续工作;我们总是在寻找成长和完善的方法。我们希望其他人也能加入我们的努力,这样我们的精力就可以用来改进,而不是竞争。

🌐 You can expect continued work on 6to5; we’re always finding ways to grow and refine. We hope others will join our efforts so our energy can be spent improving rather the competing.

——6to5 团队