不是生来就要死
我喜欢在我们的博客文章开头先讲讲 6to5 最新取得的大成就。我们还没完全达到,但再过几天 6to5 和 6to5-core 的下载量就会达到五十万次,再一个月左右就会超过一百万次。
🌐 I like to start off our blog posts with the latest big thing 6to5 has achieved. We haven’t reached it quite yet, but in a few days 6to5 and 6to5-core will have been downloaded half a million times, and in a month or so it will be over a million times.
过去人们对 6to5 在 JavaScript 社区中的角色有些困惑,这在很大程度上可以归因于它的名字。
🌐 There has been a bit of confusion in the past as to 6to5’s role in the JavaScript community, which can largely be attributed to its name.
6to5不是生来就注定要死的。
即使下一个版本的 JavaScript 在所有环境中都得到支持,6to5 所做的工作仍将在社区中发挥重要作用。
🌐 Even when the next edition of JavaScript is supported across all environments, the work that has gone into 6to5 will continue to serve an important role in the community.
从压缩工具到美化工具,从代码检查器到代码覆盖仪器,编译成 JavaScript 的语言和语法扩展,代码高亮工具等等,应有尽有。几乎任何编程语言的工具都非常依赖两样东西:解析器和转译器。
🌐 From minifiers to beautifiers, from linters to code coverage instrumentors, compile-to-javascript languages and syntax extensions, code highlighters and on and on. There are two things that almost any tooling of any programming language depends on really heavily: parsers and transpilers.
这些工具在 JavaScript 中的历史既漫长又令人沮丧。每个人都在不断地重新实现相同的东西,这造成了一团糟。这也是新语言特性推出速度慢的头号原因(比如,“我喜欢用箭头函数,但它会破坏我们的代码覆盖率”)。
🌐 The history of these tools in JavaScript has been long and sad. Everyone is constantly reimplementing the same things and it’s created an absolute mess. It’s also the number one reason new language features take a long time to roll out (i.e. “I love using Arrow Functions, but it breaks our code coverage”).
幸运的是,很多工作正在进行,以改善这一点。
🌐 Luckily a lot of work is happening to improve this.
最近,来自 Mozilla、Esprima、jQuery 基金会、Acorn、6to5、ESLint 等的许多人聚在一起创建了 ESTree,这是所有解析器和转译工具将基于的标准。
🌐 Recently a number of people from Mozilla, Esprima, The jQuery Foundation, Acorn, 6to5, ESLint, and others have come together to create ESTree, a standard upon which all parser and transpiler tooling will be based on.
我们希望 6to5 能解决转译器的问题。如果社区能聚在一个能为处理许多共同问题提供坚实基础的工具周围,那么我们大家都会好很多。
🌐 We want for 6to5 to solve the transpiler story. If the community could rally around a tool that provides a solid foundation for dealing with a lot of shared issues then we’ll all be much better off.
这听起来可能有点荒谬,也像是一个相当高远的目标。很多人会认为对于一个叫“6to5”的东西来说,这有点超出范围。
🌐 That might sound a bit absurd and like a fairly lofty goal. Many will think it’s out of scope for something named “6to5”.
我猜那最好还是给这个项目改个名字吧!
🌐 I guess it’d be a good idea to rename the project then!
6to5 现在叫做 Babel。
Babel 将继续作为一个 JavaScript 转译器,用于使用最新的标准,但也将开始为其他工具开放它的 API。任何在项目内部工作过的人都知道,Babel 非常容易使用。
🌐 Babel will continue to serve as a JavaScript transpiler for using the very latest standards, but will also begin to open up its API for other tools. Anyone who has worked on the project internally knows that Babel is incredibly easy to work with.
我们对未来感到非常兴奋,希望能够在 JavaScript 社区产生更大的影响。
🌐 We’re incredibly excited for the future and we hope that we can make an even bigger impact on the JavaScript community.
永远押注 JavaScript。
🌐 Always bet on JavaScript.
—— 最近的巴别团队