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

2018 如何玩转 JavaScript #3390

Merged
merged 4 commits into from Mar 9, 2018
Merged

2018 如何玩转 JavaScript #3390

merged 4 commits into from Mar 9, 2018

Conversation

0x0042
Copy link
Contributor

@0x0042 0x0042 commented Mar 6, 2018

译文翻译完成,resolve #3334

@Colafornia
Copy link
Contributor

校对认领

@fanyijihua
Copy link
Collaborator

@MechanicianW 好的呢 🍺

Copy link
Contributor

@Colafornia Colafornia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@llp0574 @leviding 校对完毕


Note: This blog post is part of our whitepaper, "[The Future of JavaScript: 2018 and Beyond](https://www.telerik.com/campaigns/kendo-ui/wp-javascript-future-2018)", which offers our future-looking analysis and predictions about the latest in JavaScript.
注意:这篇博文是我们白皮书的一部分,《[JavaScript 的未来:2018 及以后](https://www.telerik.com/campaigns/kendo-ui/wp-javascript-future-2018)》,里面讲述了我们对 JavaScript 未来的分析及最近情况的预测。
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

“白皮书的一部分,《JavaScript 的未来” 逗号与书名号中间多了个空格

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这眼力!

Copy link
Contributor Author

@0x0042 0x0042 Mar 8, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

中文的逗号和书名号之间的空隙就这么大,没有多空格。。。


Note: This blog post is part of our whitepaper, "[The Future of JavaScript: 2018 and Beyond](https://www.telerik.com/campaigns/kendo-ui/wp-javascript-future-2018)", which offers our future-looking analysis and predictions about the latest in JavaScript.
注意:这篇博文是我们白皮书的一部分,《[JavaScript 的未来:2018 及以后](https://www.telerik.com/campaigns/kendo-ui/wp-javascript-future-2018)》,里面讲述了我们对 JavaScript 未来的分析及最近情况的预测。
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

对 JavaScript 未来的分析及最近情况的预测 => 对 JavaScript 未来的分析及近况的预测
感觉这样顺口点


Configuring your webpack build process and really understanding what you were doing, was probably one of the more daunting learning curves of 2017. Thankfully, they had one of their core contributors, [Sean Larkin](https://twitter.com/thelarkinn), running around the world supplying us with [great talks](https://www.youtube.com/watch?v=4tQiJaFzuJ8&t=3526s) and [really fun and helpful tutorials](https://www.twitch.tv/videos/209664650?t=1h57m40s).
配置 webpack 构建过程并真正理解其中原理,可能是 2017 年最艰巨的学习曲线之一。值得感谢的是,他们其中一个核心贡献者 [Sean Larkin](https://twitter.com/thelarkinn),到处在进行[很棒的演讲](https://www.youtube.com/watch?v=4tQiJaFzuJ8&t=3526s),并提供[真正有趣且有用的教程](https://www.youtube.com/watch?v=4tQiJaFzuJ8&t=3526s)给我们学习。
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

真正有趣且有用的教程 的 链接贴错了,应该是 https://www.twitch.tv/videos/209664650?t=1h57m40s


Configuring your webpack build process and really understanding what you were doing, was probably one of the more daunting learning curves of 2017. Thankfully, they had one of their core contributors, [Sean Larkin](https://twitter.com/thelarkinn), running around the world supplying us with [great talks](https://www.youtube.com/watch?v=4tQiJaFzuJ8&t=3526s) and [really fun and helpful tutorials](https://www.twitch.tv/videos/209664650?t=1h57m40s).
配置 webpack 构建过程并真正理解其中原理,可能是 2017 年最艰巨的学习曲线之一。值得感谢的是,他们其中一个核心贡献者 [Sean Larkin](https://twitter.com/thelarkinn),到处在进行[很棒的演讲](https://www.youtube.com/watch?v=4tQiJaFzuJ8&t=3526s),并提供[真正有趣且有用的教程](https://www.youtube.com/watch?v=4tQiJaFzuJ8&t=3526s)给我们学习。
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

他们其中一个核心贡献者 => webpack 的一个核心贡献者
"他们"指代不明,与前文不是一个主语

* Automatically spawns the Selenium server
* `npm run dev`: 首选开发体验
* 对单个文件的 Vue 组件使用 Webpack + `vue-loader`
* 热重载保留状态State preserving hot-reload
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

英文原文还在


The [preact-cli](https://github.com/developit/preact-cli#webpack), on the other hand, takes care of the standard webpack functionality. Then if you need to customize your webpack configurations you just create a `preact.config.js` file which exports a function that makes your webpack changes. So many tools, so much help; developers helping developers 💞.
另一方面,[preact-cli](https://github.com/developit/preact-cli#webpack) 负责标准的 webpack 功能。然后如果你需要自定义 webpack 配置的话只需要创建一个 `preact.config.js` 文件,这个文件会输出一个函数使得你的 webpack 产生变化。这么多的工具,这么多帮助,开发者互助 💞。
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

然后如果你需要自定义 webpack 配置 => 那么如果你需要自定义 webpack 配置

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

我觉得“那么”也可以去掉


## Babel On or Off
## 开启或关闭 Babel
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

开启或关闭 => 开启还是关闭


[![browser user statistics](//d585tldpucybw.cloudfront.net/sfimages/default-source/blogs/2018/2018-02/browser-user-statistics.png?sfvrsn=896a6611_1 "browser user statistics")](//d585tldpucybw.cloudfront.net/sfimages/default-source/blogs/2018/2018-02/browser-user-statistics.png?sfvrsn=896a6611_1)

Okay, turning off Babel may be a long ways aways because when it comes down to it we want to make a concerted effort to be accessible to as many users as we can. It is interesting to consider that we may be able to get rid of that extra step. You know, like before, when we didn't use transpilers 😆.
好吧,停用 Babel 可能还需要很长一段时间,因为我们想在低版本浏览器的时候,还是尽最大可能让大量用户可以使用它们。考虑到我们可能可以摆脱掉这个额外的步骤是很有趣的。你知道的,就像以前那样,当我们还没有使用编译器的时候 😆。
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

因为我们想在低版本浏览器的时候,还是尽最大可能让大量用户可以使用它们 => 因为我们还是尽最大可能让使用低版本浏览器的用户可以正常使用我们的应用


If we're talking about how to JavaScript we must talk about [TypeScript](https://www.typescriptlang.org/). TypeScript came out of the Microsoft office five years ago but has become the cool kid in town 😎 in 2017. There was rarely a conference that didn't have a "Why We Love TypeScript" talk; it's like the new dev heartthrob. Without writing a sonnet to TypeScript, let's talk a bit about why developers are crushing hard.
如果我们讨论要如何玩转 JavaScript,那么我们必须得讨论到 [TypeScript](https://www.typescriptlang.org/)。五年前 TypeScript 从微软工作室横空出世,但在 2017 年它已经成为一门很酷的语言 😎。很少有会议没有“为什么我们爱 TypeScript”这类主题的演讲,这就跟新的开发者万人迷一样。在没有歌颂 TypeScript 的时候,让我们来讨论一下为什么如此看重它。
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

在没有歌颂 TypeScript 的时候 => 本文不再歌颂 TypeScript


For everyone who wanted types in JavaScript, TypeScript is here to offer a strict syntactical superset of JavaScript which gives optional static typing. Pretty cool, if you're into that kind of thing. Of course, if you take a look at the newest results from the [State of JavaScript](https://stateofjs.com/2017/introduction/) survey, it seems that a lot of people ARE, in fact, into that kind of thing.
为了每个想要在 JavaScript 里使用类型的开发者,TypeScript 在这里提供了一个严格的 JavaScript 语法超集,赋予了可选的静态类型。如果你那么做,就会发现那是相当酷的。当然,如果你看一下 [JavaScript 状态](https://stateofjs.com/2017/introduction/)的最新调查结果,就会发现似乎事实上大量开发者都喜欢这么做。
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

如果你那么做 => 如果你体验过

@ParadeTo
Copy link
Contributor

ParadeTo commented Mar 6, 2018

校对认领

@fanyijihua
Copy link
Collaborator

@ParadeTo 妥妥哒 🍻

Copy link
Contributor

@ParadeTo ParadeTo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

翻译和校对都很不错


Note: This blog post is part of our whitepaper, "[The Future of JavaScript: 2018 and Beyond](https://www.telerik.com/campaigns/kendo-ui/wp-javascript-future-2018)", which offers our future-looking analysis and predictions about the latest in JavaScript.
注意:这篇博文是我们白皮书的一部分,《[JavaScript 的未来:2018 及以后](https://www.telerik.com/campaigns/kendo-ui/wp-javascript-future-2018)》,里面讲述了我们对 JavaScript 未来的分析及最近情况的预测。
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这眼力!


The [preact-cli](https://github.com/developit/preact-cli#webpack), on the other hand, takes care of the standard webpack functionality. Then if you need to customize your webpack configurations you just create a `preact.config.js` file which exports a function that makes your webpack changes. So many tools, so much help; developers helping developers 💞.
另一方面,[preact-cli](https://github.com/developit/preact-cli#webpack) 负责标准的 webpack 功能。然后如果你需要自定义 webpack 配置的话只需要创建一个 `preact.config.js` 文件,这个文件会输出一个函数使得你的 webpack 产生变化。这么多的工具,这么多帮助,开发者互助 💞。
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

我觉得“那么”也可以去掉


In the first graph those red chunks on the left are compilers (e.g. es-6 shim, Closure, etc.) and older browsers (i.e. Kong 4.14 and IE 11). Then the five mostly red columns on the right are the server/compilers PJS, JXA, Node 4, DUK 1.8 and DUK 2.2. On the lower graph that red section that kind of looks like a bad drawing of a dog looking at a messed up exclamation point are servers/runtimes with only Node 6.5+ having green streaks. The makeup of the left red square are the compilers/polyfils and IE 11. More importantly, LOOK AT ALL THAT GREEN! In the most popular browsers, we have practically all green. The only red mark for 2017 features is on Firefox 52 ESR for Shared Memory and Atomics.
第一个图表里左边那些红色的块都是编译器(如 es-6 shimClosure 等)和旧的浏览器(如 Kong 4.14 和 IE 11 等)。然后右侧的五个红色块都是服务器或编译器,如 PJSJXANode 4DUK 1.8 DUK 2.2 等。在较下面的图上,看起来像一只乱画的狗在看着乱七八糟感叹号的红色部分,是只包含 Node 6.5+ 支持的服务器或运行时间。左边红色正方形的构成则是编译器或 polyfil 以及 IE 11 的支持。更重要的是,**看看那些绿色的部分!**在最流行的浏览器里,我们看到几乎都是绿色的。2017 特性仅有的红色标记是在 Firefox 52 ESR 对共享内存和原子化的支持。
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

runtimes => 运行时

@leviding
Copy link
Member

leviding commented Mar 7, 2018

@llp0574 来修改啦

@0x0042
Copy link
Contributor Author

0x0042 commented Mar 8, 2018

@MechanicianW 修改完了
@ParadeTo 校对完了吗?

@ParadeTo
Copy link
Contributor

ParadeTo commented Mar 8, 2018

@llp0574 完了

@0x0042
Copy link
Contributor Author

0x0042 commented Mar 8, 2018

@ParadeTo 好的,感谢。
@MechanicianW 辛苦二位校对,十分感谢。
@leviding 可以merge了哈。

@0x0042
Copy link
Contributor Author

0x0042 commented Mar 8, 2018

@leviding 已分享。link

@leviding
Copy link
Member

leviding commented Mar 8, 2018

@llp0574 你在 view 模式下看一下,格式是不是有问题。调节一下。

image

@0x0042
Copy link
Contributor Author

0x0042 commented Mar 8, 2018

@leviding 不知道什么情况。。。我放到我的站上都是对的呢

@leviding
Copy link
Member

leviding commented Mar 9, 2018

@0x0042
Copy link
Contributor Author

0x0042 commented Mar 9, 2018

@leviding 不是,我意思是放到我自己的网站上显示是对的

@leviding leviding merged commit f3c728a into xitu:master Mar 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2018 如何玩转 JavaScript
5 participants