Skip to content

Commit 157b521

Browse files
committed
up
1 parent 0ddfb84 commit 157b521

1 file changed

Lines changed: 8 additions & 7 deletions

File tree

1-js/1-getting-started/2-es-modern-now/article.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,20 @@ But what if we're writing a cross-browser application?
1111

1212
## Babel.JS
1313

14-
[Babel.JS](https://babeljs.io) is a [transpiler](https://en.wikipedia.org/wiki/Source-to-source_compiler), it rewrites the modern JavaScript code into the previous standard.
14+
[Babel.JS](https://babeljs.io) is a [transpiler](https://en.wikipedia.org/wiki/Source-to-source_compiler). It rewrites the modern JavaScript code into the previous standard.
1515

16-
17-
Он состоит из двух частей:
16+
Actually, there are two parts in Babel:
1817

1918
<ol>
20-
<li>Собственно транспайлер, который переписывает код.</li>
21-
<li>Полифилл, который добавляет методы `Array.from`, `String.prototype.repeat` и другие.</li>
19+
<li>The transpiler itself, which rewrites the code.</li>
20+
<li>An additional JavaScript library which adds the support for modern JavaScript functions to the browser.</li>
2221
</ol>
2322

24-
На странице [](https://babeljs.io/repl/) можно поэкспериментировать с транспайлером: слева вводится код в ES-2015, а справа появляется результат его преобразования в ES5.
23+
The transpiler runs on a developer's computer. It rewrites the code, which is then bundled by a project build system (like [webpack](http://webpack.github.io/) or [brunch](http://brunch.io/)). Most build systems can support Babel easily. One just needs to setup the build system itself.
24+
25+
Most syntax-level language features
26+
The JavaScript library if required if
2527

26-
Обычно Babel.JS работает на сервере в составе системы сборки JS-кода (например [webpack](http://webpack.github.io/) или [brunch](http://brunch.io/)) и автоматически переписывает весь код в ES5.
2728

2829
Настройка такой конвертации тривиальна, единственно -- нужно поднять саму систему сборки, а добавить к ней Babel легко, плагины есть к любой из них.
2930

0 commit comments

Comments
 (0)