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

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.

主站蜘蛛池模板: 红安县| 乌拉特中旗| 申扎县| 麦盖提县| 吕梁市| 友谊县| 历史| 哈密市| 麦盖提县| 南丰县| 武川县| 阆中市| 安丘市| 白山市| 曲水县| 福清市| 阳原县| 华容县| 阿鲁科尔沁旗| 那曲县| 邯郸县| 田林县| 巴林右旗| 宁乡县| 永善县| 邢台县| 阜新市| 汕尾市| 东乡| 宁阳县| 泽库县| 浙江省| 山西省| 杭锦旗| 英超| 沛县| 奉贤区| 万载县| 陆丰市| 青田县| 常山县|