Quantcast
Channel: OSCHINA 社区最新新闻
Viewing all articles
Browse latest Browse all 44787

CoffeeScript 1.12.0 发布,脚本语言

$
0
0

CoffeeScript 1.12.0 发布了。 coffeeScript这一门编程语言构建在JavaScript之上,其被编译成高效的JavaScript,这样你就可以在web浏览器上运 行它,或是通过诸如用于服务器端应用的Node.js一类的技术来使用它。编译过程通常都很简单,产生出来的JavaScript与许多的最佳做法都保持了一致。 此次更新内容:

  • CoffeeScript 现在支持 ES2015 标记的模板字面量。Note that using tagged template literals in your code makes you responsible for ensuring that either your runtime supports tagged template literals or that you transpile the output JavaScript further to a version your target runtime(s) support.

  • CoffeeScript 现在提供一个 for…from 用于 ES2015 的输出语法  for…ofSorry they couldn’t match, but we came up with for…of first for something else.) This allows iterating over generators or any other iterable object. Note that using for…from in your code makes you responsible for ensuring that either your runtime supports for…of or that you transpile the output JavaScript further to a version your target runtime(s) support.

  • 在单反引号嵌入在 JavaScript 中,反引号现在可以通过\`转义

  • 浏览器测试现在再次在浏览器中运行,如果您想测试浏览器,可以在这里访问

  • ES2015 中仅限用于 CoffeeScript 的关键字 imports and exports 现已被忽略.

  • 编译器现在在尝试导出匿名类时抛出一个错误

  • 与 Token 和位置数据相关的错误修复,更好的源映射和改进与下游工具的兼容性

完整更新内容发布说明

下载地址


Viewing all articles
Browse latest Browse all 44787

Trending Articles