CoffeeScript 1.11.0 发布了。
offeeScript这一门编程语言构建在JavaScript之上,其被编译成高效的JavaScript,这样你就可以在web浏览器上运 行它,或是通过诸如用于服务器端应用的Node.js一类的技术来使用它。编译过程通常都很简单,产生出来的JavaScript与许多的最佳做法都保持了一致。
此次更新内容:
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 0
, NaN
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.
详细内容,请查看发行日志。
下载地址: