官术网_书友最值得收藏!

  • JavaScript:Moving to ES2015
  • Ved Antani Simon Timms Narayan Prusty
  • 174字
  • 2021-07-09 19:07:41

Transpilers

Transpiling is a technique that combines both compilation and transformation. The idea is to write ES6-compatible code and use a tool that transpiles this code into a valid and equivalent ES5 code. We will be looking at the most complete and popular transpiler for ES6 called Babel (https://babeljs.io/).

Babel can be used in various ways. You can install it as a node module and invoke it from the command line or import it as a script in your web page. Babel's setup is exhaustive and well-documented at https://babeljs.io/docs/setup/. Babel also has a great Read-Eval-Print-Loop (REPL). We will Babel REPL for most of the examples in this chapter. An in-depth understanding of various ways in which Babel can be used is out of the scope of this module. However, I would urge you to start using Babel as part of your development workflow.

We will cover the most important part of ES6 specifications in this chapter. You should explore all the features of ES6 if possible and make them part of your development workflow.

主站蜘蛛池模板: 虹口区| 枣阳市| 罗源县| 安乡县| 广宗县| 余干县| 万源市| 镇沅| 奉化市| 临高县| 巴青县| 彰化县| 滨海县| 芜湖县| 菏泽市| 保康县| 澄迈县| 章丘市| 濮阳县| 萍乡市| 沾化县| 武宁县| 锡林浩特市| 贵阳市| 刚察县| 彝良县| 贵溪市| 邢台县| 桑植县| 克什克腾旗| 巴塘县| 泸州市| 林甸县| 子洲县| 乌拉特前旗| 迭部县| 清丰县| 黄浦区| 麟游县| 鹤壁市| 大港区|