发布于 2016-09-25 00:02:32 | 147 次阅读 | 评论: 0 | 来源: 网友投递

这里有新鲜出炉的CoffeeScript 中文手册,程序狗速度看过来!

CoffeeScript

CoffeeScript是一套JavaScript的转译语言,创建者 Jeremy Ashkenas 戏称它是- JavaScript 的不那么铺张的小兄弟。因为 CoffeeScript 会将类似 Ruby 语法的代码编译成 JavaScript,而且大部分结构都相似,但不同的是 CoffeeScript 拥有更严格的语法。


CoffeeScript 1.11.0 发布了。

此次更新内容:

  • CoffeeScript now supports ES2015 import and export syntax.

  • Added the -M, --inline-map flag to the compiler, allowing you embed the source map directly into the output JavaScript, rather than as a separate file.

  • A bunch of fixes for yield:

    • yield return can no longer mistakenly be used as an expression.

    • yield now mirrors return in that it can be used stand-alone as well as with expressions. Where you previously wrote yield undefined, you may now write simply yield. However, this means also inheriting the same syntax limitations that return has, so these examples no longer compile:

      doubles = ->
        yield for i in [1..3]
          i * 2
      
      six = ->
        yield
          2 * 3
    • The JavaScript output is a bit nicer, with unnecessary parentheses and spaces, double indentation and double semicolons around yield no longer present.

  • Improved several error messages.

  • Just like undefined compiles to void 0NaN now compiles into 0/0 and Infinity into 2e308.

  • Bugfix for renamed destrucured parameters with defaults. ({a: b = 1}) -> no longer crashes the compiler.

  • Improved the internal representation of a CoffeeScript program. This is only noticeable to tools that use CoffeeScript.tokens or CoffeeScript.nodes. Such tools need to update to take account for changed or added tokens and nodes.

  • Several minor bug fixes.

详细内容,请查看发行日志

下载地址:



历史版本 :
CoffeeScript 2.1.1 发布,脚本语言
CoffeeScript 2.1.0 发布,脚本语言
CoffeeScript 1.12.8 发布,脚本语言
CoffeeScript 2.0.0 正式发布,编译成 JS 的小巧语言
CoffeeScript 2.0.0-beta5 发布,编译成 JS 的小巧语言
CoffeeScript 2.0.0-beta2 发布,脚本语言
CoffeeScript 1.12.6 发布,脚本语言
CoffeeScript 2.0.0-alpha1 发布,脚本语言
CoffeeScript 1.12.5 发布,脚本语言
CoffeeScript 1.12.4 发布,脚本语言
CoffeeScript 1.12.3 发布,脚本语言
CoffeeScript 1.12.1 发布,脚本语言
最新网友评论  共有(0)条评论 发布评论 返回顶部

Copyright © 2007-2017 PHPERZ.COM All Rights Reserved   冀ICP备14009818号  版权声明  广告服务