Install:npm install --save-dev babel-loaderwebpack.config.js:Add module, tell webpack to find all js file and use babel as loader, exclude all files i...
分类:
Web程序 时间:
2015-09-08 16:43:22
阅读次数:
461
You can easily spend hours configuring the perfect dev environment with all the latest hotness like ES6 (and beyond) support, hot reloading, and a myr...
分类:
Web程序 时间:
2015-09-06 06:23:09
阅读次数:
509
最近在跟着阮一峰的es6系列文章学习es6,在let和const命令这一章中,发现了一些错误,特列出一、let不存在变量提升假设let不存在变量提升,那么在阮一峰的文章中的这段代码代码是正确的function do_something() { console.log(foo); // Refere....
分类:
其他好文 时间:
2015-09-04 12:33:29
阅读次数:
472
ThinkJS是一款高效、简单易用的Node.js MVC框架。该框架借鉴了很多?ThinkPHP?的特性,同时结合Node.js的特性,使用了?ES6 Promise,让异步编程更加简单、方便。 目前打算使用ThinkJS来开发APP后端服务。 Thin...
分类:
Web程序 时间:
2015-09-02 10:51:15
阅读次数:
266
ESLint is a JavaScript linter (static analysis tool) that offers full support for ES6, JSX, and other modern tools via plugins. We walk through settin...
分类:
Web程序 时间:
2015-08-31 17:02:34
阅读次数:
187
Reflect:基础:let Class = class {};Reflect.construct(Class) instanceof Class // truelet obj = {x: 23};Reflect.get(obj, 'x') // 23Reflect.has(obj, 'x') //...
分类:
其他好文 时间:
2015-08-30 20:56:10
阅读次数:
354
Map:初始化:const mapSize = (new Map()).size; //mapSize: 0const pair1 = [1, 'one']; const pair2 = [2, 'two'];const map = new Map([pair1, pair2]); //new...
分类:
其他好文 时间:
2015-08-30 15:37:31
阅读次数:
171
类(class):class关键词:let TestClass = class {};const instance = new TestClass();{class Inside {}}typeof Inside // undefined: block scoped方法与constructor:cl...
分类:
其他好文 时间:
2015-08-30 12:50:50
阅读次数:
202
Generator:创建:function* g() {} // g: [object Generator]let g = function*() {};let obj = {*g() {}};const generatorName = 'g';let obj = {*[generatorName]...
分类:
其他好文 时间:
2015-08-30 12:45:32
阅读次数:
197
Destructuring:数组:let [firstValue] = [1]; // firstValue: 1let c, d;let [a, b] = [c, d] = [1, 2];var [head, ...tail] = [1, 2, 3, 4]; // tail: [2,3,4]可以交...
分类:
其他好文 时间:
2015-08-30 12:44:59
阅读次数:
112