Skip to content

Commit

Permalink
Update ScalaJS example project
Browse files Browse the repository at this point in the history
  • Loading branch information
rickynils committed Feb 5, 2015
1 parent 9d9ed58 commit 3c06389
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
11 changes: 8 additions & 3 deletions examples/scalajs/README.md
Expand Up @@ -12,16 +12,21 @@ To get started, open `sbt` in this example project, and execute the task
`test`. This should execute the ScalaCheck properties found in the `src/test` directory.

You will find that test execution is very slow, but you can speed it up
considerably by installing [Node.js](http://nodejs.org/), and running the sbt
tast `fastOptStage::test` instead of `test`.
considerably by installing [Node.js](http://nodejs.org/), and setting the sbt
setting `scalaJSStage` to `FastOptStage`. For example, for a project `js` this
can be set on the command line with:

```
set scalaJSStage in js := FastOptStage
```

The following is what you need to add to your `build.sbt` file to make the
ScalaCheck test runner work:

```
resolvers += "sonatype-snapshots" at "https://oss.sonatype.org/content/repositories/snapshots"
libraryDependencies += "org.scalacheck" %%% "scalacheck" % "1.12.2-SNAPSHOT" % "test"
libraryDependencies += "org.scalacheck" %%% "scalacheck" % "1.12.2" % "test"
ScalaJSKeys.scalaJSTestFramework := "org.scalacheck.ScalaCheckFramework"
```
Expand Down
10 changes: 3 additions & 7 deletions examples/scalajs/build.sbt
@@ -1,15 +1,11 @@
scalaJSSettings
enablePlugins(ScalaJSPlugin)

name := "ScalaCheck-scalajs-example"

version := "0.1-SNAPSHOT"

scalaVersion := "2.11.4"
scalaVersion := "2.11.5"

javacOptions += "-Xmx2048M"

resolvers += "sonatype-snapshots" at "https://oss.sonatype.org/content/repositories/snapshots"

libraryDependencies += "org.scalacheck" %%% "scalacheck" % "1.12.2-SNAPSHOT" % "test"

ScalaJSKeys.scalaJSTestFramework := "org.scalacheck.ScalaCheckFramework"
libraryDependencies += "org.scalacheck" %%% "scalacheck" % "1.12.2" % "test"
2 changes: 1 addition & 1 deletion examples/scalajs/project/build.sbt
@@ -1 +1 @@
addSbtPlugin("org.scala-lang.modules.scalajs" % "scalajs-sbt-plugin" % "0.5.6")
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "0.6.0")

0 comments on commit 3c06389

Please sign in to comment.