Scala.js v0.1 发布,将Scala转成JavaScript的编译器

jopen 10年前

Scala.js将Scala代码编译成JavaScript,让您完全可以用Scala编写Web应用程序!注意! Scala.js仍处于试验阶段!
突出的特点是:

  • Support all of Scala (including macros!), modulo a few semantic differences
  • Very good interoperability with JavaScript code. For example, use jQuery and HTML5 from your Scala.js code, either in a typed or untyped way. Or create Scala.js objects and call their methods from JavaScript.
  • Integrated with sbt (including support for dependency management and incremental compilation)
  • Can be used with your favorite IDE for Scala
  • Generates Source Maps for a smooth debugging experience (step through your Scala code from within your browser supporting source maps)
  • Integrates Google Closure Compiler for producing minimal code for production.

今天我们发布了 Scala.js 的首个版本,这个项目是在今年六月份的时候宣布的。

第一个版本支持的特性:

  • 支持所有 Scala 特性,包括宏,不过有一些 语义上的区别
  • 可非常好的跟 JavaScript 代码进行交互
  • 集成了 sbt (包括支持依赖管理和增量编译)
  • 可使用你喜欢的 Scala 集成开发环境
  • 生成 Source Maps 用于平顺的调试体验
  • 集成 Google Closure Compiler 用于产品环境的最小代码量

Scala.js v0.1 发布,在浏览器直接运行 Scala