Giter Club home page Giter Club logo

babel-usage's Introduction

Issues

有任何此 repo 的问题,或者 babel 使用的疑惑,都可以新建 issue,一起讨论~

介绍

多个 babel 包的使用 example,每个文件夹下对应有 .babelrc 和 README,可以查看用法。

适用于你在代码中去执行 babel 编译。

适用于开发环境,做解析器用。

了解什么是 babel-helpers,启用了 transform-runtime 就不需要自己生产了。

通过两种不同的垫片方式,在 node 4.8.4 中利用编译器( babel-register)实现 async 函数的运行。

通过 webpack 打包,检测 transform-runtime 的效果,是否会重复引入 asyncToGenerator 函数,build 文件 size 。

mocha 结合 babel 测试 es6+ 的代码。

  • env 这个东西,适用于你知道你要运行的环境,它会帮你做好适配。另外,一些特殊的 plugins 还是需要加入的。要清楚它能做到什么。

  • env 默认情况下,跟 preset-lastest 一样,都包括了 preset-es2015,es2016,es2017。如果你要使用一些提案中的语法,还要加上 preset-stage-x

babel-usage's People

Contributors

sunyongjian avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.