- ECOOP 2012 paper (PDF) and slides (PDF)
- Scala Days 2012 talk
- Setup virtualization-lms-core:
$ git clone [email protected]:TiarkRompf/virtualization-lms-core.git
$ cd virtualization-lms-core
$ sbt publish-local
- Clone the project and manage it using sbt:
$ cd ..
$ git clone [email protected]:js-scala/js-scala.git
$ cd js-scala
$ sbt
- Run the tests:
> test
- Publish it (if you want to use it in your project):
> publish-local
- Run the examples:
> project examples
> run
- Add a dependency on js-scala 0.4-SNAPSHOT
libraryDependencies += "EPFL" %% "js-scala" % "0.4-SNAPSHOT"
- Use Scala 2.10.2-RC1 and set the Scala organization to
org.scala-lang.virtualized
scalaVersion := "2.10.2-RC1"
scalaOrganization := "org.scala-lang.virtualized"
- Set the
-Yvirtualize
compiler option
scalacOptions += "-Yvirtualize"
Tweak your project/Build.scala
file to look like the following:
object ApplicationBuild extends Build {
val appName = "foo"
val appVersion = "1.0-SNAPSHOT"
val appDependencies = Seq(
"EPFL" %% "js-scala" % "0.3-SNAPSHOT"
)
val main = play.Project(appName, appVersion, appDependencies).settings(
scalaOrganization := "org.scala-lang.virtualized",
scalacOptions ++= Seq("-deprecation", "-unchecked", "-Xexperimental", "-Yvirtualize")
)
}
- build-play20 builds Play 2! and all its transitive Scala dependencies with Scala-Virtualized, for compatibility with this DSL. Deployment on dotcloud is an option.
-
play-js-validation uses this DSL to enable form validation code in Play 2.0 to be written once and checked on both client and server sides.
-
forest uses this DSL to enable HTML templates to be written once and shared between client and server sides, both for initial rendering and automatic updating.