Coder Social home page Coder Social logo

es6's Introduction

###相关URL

  1. http://www.infoq.com/cn/articles/es6-in-depth-generators
  2. https://github.com/ES-CN/es6features/blob/master/README.md
  3. http://es6.ruanyifeng.com/#docs/generator

node.js:harmony模式

node --harmony
node -v8-options | grep harmony

执行: npm环境:babel:e6到es5的转换器

npm install -g babel

babel a.js //将a.js转化成es5的实现
babel a.js -o a-complied.js

babel-node //进入REPL模式
babel-node -e "class Test{}"
babel-node test

<https://babeljs.io/docs/usage/cli/>

html环境: traceur

npm install babel-core

<script src="http://google.github.io/traceur-compiler/bin/traceur.js"></script>
<script src="http://google.github.io/traceur-compiler/src/bootstrap.js"></script>
<script type="module" src="js/proxy-reflect.js"></script>

babel:

<script src="node_modules/babel-core/browser.js"></script>
<script type="text/babel">
class Test {
  test() {
    return "test";
  }
}

var test = new Test;
test.test(); // "test"
</script>

es6's People

Watchers

 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.