🎶 Sym - 一款用 Java 实现的现代化社区(论坛/BBS/社交网络/博客)平台

📕 思源笔记 - 一款桌面端笔记应用,支持 Windows、Mac 和 Linux

🎸 Solo - B3log 分布式社区的博客端节点,欢迎加入下一代社区网络

♏ Vditor - 一款浏览器端的 Markdown 编辑器

Babel Stage-X

都怪自己眼瞎,辣么绿的一块都木看仔细
1468314275204

结果就是很悲催,网上找了一通,不行。连 babel-polyfill 都试了,回头再看一遍,Sogo, So easy!

var babel = require('gulp-babel')
gulp.src("./ES7/Exponentiation/demo.js")
        .pipe(babel({presets: ["stage-1"]}))
        .pipe(gulp.dest("./ES7/Exponentiation/dist"));

但是但是,好不容易到了终点,居然有 bug: https://github.com/babel/babylon/issues/26

具体代码可见: https://github.com/Vanessa219/emulation/tree/master/ES7/Exponentiation


顺带贴一下 ECMAScript 每个阶段的说明

The TC39 categorises proposals into 4 stages:

  • stage-0 - Strawman: just an idea, possible Babel plugin.
  • stage-1 - Proposal: this is worth working on.
  • stage-2 - Draft: initial spec.
  • stage-3 - Candidate: complete spec and initial browser implementations.
  • stage-4 - Finished: will be added to the next yearly release.
    Also check out the current tc39 proposals and its process document.

欢迎注册黑客派社区,开启你的博客之旅。让学习和分享成为一种习惯!

推荐阅读
留下你的脚步