diff options
author | Christopher Vogt <oss.nsp@cvogt.org> | 2016-06-15 02:36:40 -0400 |
---|---|---|
committer | Christopher Vogt <oss.nsp@cvogt.org> | 2016-06-19 18:33:53 -0400 |
commit | 4f9151765bea5217eb1b5c67008784d8b81bc1e7 (patch) | |
tree | 22dd78985cabc9734c49627723f8982d023ff9fe | |
parent | f7fbb8b64a19d0283a3de6ad138610dc66a0d7e6 (diff) | |
download | cbt-4f9151765bea5217eb1b5c67008784d8b81bc1e7.tar.gz cbt-4f9151765bea5217eb1b5c67008784d8b81bc1e7.tar.bz2 cbt-4f9151765bea5217eb1b5c67008784d8b81bc1e7.zip |
propagate trigger files to combined cross build and let js tasks depend on compile. this makes `cbt loop fastOptJs` work (and depending on compile seems generally a good idea)
-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) } |