GithubHelp home page GithubHelp logo

course-babel's Introduction

babel

仓库的使用方式

$ npm install

babel命令

$ npm run build

babel和gulp结合

$ npm run dev

babel相关

babel -> 分拆

单独维护

npm instlal babel --save-dev

babel

  • babel-core
  • babel-cli
  • babel-preset-x
  • babel-plugin-x
  • babel-polyfill
  • .......

babel-cli

  • babel
  • babel-node

presets

一系列的plugin插件组合 完成es2015

plugin

每一个插件只做一件事情

babel-plugin-transform-runtime

babel-core

API -> code

babel-loader

依赖关系 babel-core 一起下载

loose

  • normal
  • loose

模块化规范

define(['a'], function(){

})
define(function(require, module, exports){

})
var fs = require('fs')

module.exports = function(){

}
import React from 'react';

export default a;

兼容IE8

API 浏览器运行

兼容

Array.from -> API

报错了 浏览器

polyfill

babel-polyfill

require('babel-polyfill')

API

生态

  • plugin 扩展插件
  • gulp-babel
  • webpack
  • browserify
  • mocha/karma

gulp

  • 代码解析
  • 打包合并
  • 压缩 混淆
  • md5

上线

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.