diff options
-rw-r--r-- | examples/build-scalajs/README.md | 11 | ||||
-rw-r--r-- | plugins/scalajs/ScalaJs.scala | 11 |
2 files changed, 14 insertions, 8 deletions
diff --git a/examples/build-scalajs/README.md b/examples/build-scalajs/README.md index ecc4821..74e015a 100644 --- a/examples/build-scalajs/README.md +++ b/examples/build-scalajs/README.md @@ -1,12 +1,11 @@ Compilation instructions ------------------------------------------- -1. `cbt compile` -2. `cbt fastOptJS` +1. `cbt fastOptJS` Execution instructions ------------------------------------------- -2. `cd server` -3. `npm install` -4. `node app.js` -5. Go to http://localhost:3000 in a browser
\ No newline at end of file +1. `cd server` +2. `npm install` +3. `node app.js` +4. Go to http://localhost:3000 in a browser
\ No newline at end of file diff --git a/plugins/scalajs/ScalaJs.scala b/plugins/scalajs/ScalaJs.scala index 6a19d05..9677896 100644 --- a/plugins/scalajs/ScalaJs.scala +++ b/plugins/scalajs/ScalaJs.scala @@ -32,6 +32,8 @@ trait ScalaJsBuild extends BaseBuild with ScalaJsSbtDependencyDsl with ScalaJsIn Seq(s"-Xplugin:${scalaJsCompilerDep.jar.getAbsolutePath}", "-Xplugin-require:scalajs") } + override def triggerLoopFiles = super.triggerLoopFiles ++ (jvmBuild.sources ++ jsBuild.sources).distinct + def jvmDependencies = Seq.empty[Dependency] //TODO: implement def jsDependencies = Seq.empty[Dependency] @@ -69,9 +71,14 @@ trait ScalaJsBuild extends BaseBuild with ScalaJsSbtDependencyDsl with ScalaJsIn jsBuild.target.getAbsolutePath) ++ jsBuild.dependencies.collect{case d: BoundMavenDependency => d.jar.getAbsolutePath}, scalaJsCliDep.classLoader(jsBuild.context.classLoaderCache)) + def fastOptJS = { + compile + link(FastOptJS, fastOptOutput, scalaJsOptions) + } + def fullOptJS = { + compile + link(FullOptJS, fastOptOutput, scalaJsOptions) } - def fastOptJS = link(FastOptJS, fastOptOutput) - def fullOptJS = link(FullOptJS, fullOptOutput) def fastOptOutput: String = output(FastOptJS) def fullOptOutput: String = output(FullOptJS) } |