diff options
author | Christopher Vogt <oss.nsp@cvogt.org> | 2016-06-15 02:38:26 -0400 |
---|---|---|
committer | Christopher Vogt <oss.nsp@cvogt.org> | 2016-06-19 18:33:53 -0400 |
commit | 12d5bad267b5759e941b7101578808aeb6351e66 (patch) | |
tree | 92750b6141a5083c1c56db1ce140d692a89d8aa9 | |
parent | 4f9151765bea5217eb1b5c67008784d8b81bc1e7 (diff) | |
download | cbt-12d5bad267b5759e941b7101578808aeb6351e66.tar.gz cbt-12d5bad267b5759e941b7101578808aeb6351e66.tar.bz2 cbt-12d5bad267b5759e941b7101578808aeb6351e66.zip |
add support for custom scalaJsOptions
-rw-r--r-- | plugins/scalajs/ScalaJs.scala | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/plugins/scalajs/ScalaJs.scala b/plugins/scalajs/ScalaJs.scala index 9677896..8b55044 100644 --- a/plugins/scalajs/ScalaJs.scala +++ b/plugins/scalajs/ScalaJs.scala @@ -59,7 +59,6 @@ trait ScalaJsBuild extends BaseBuild with ScalaJsSbtDependencyDsl with ScalaJsIn private def output(mode: JsOutputMode) = s"${jsBuild.target.getAbsolutePath}/$projectName-${mode.fileSuffix}.js" - //TODO: should process all options that Scalajsld recognizes? private def link(mode: JsOutputMode, outputPath: String) = { lib.runMain( "org.scalajs.cli.Scalajsld", @@ -68,9 +67,15 @@ trait ScalaJsBuild extends BaseBuild with ScalaJsSbtDependencyDsl with ScalaJsIn "--sourceMap", "--stdlib", s"${scalaJsLibDep.jar.getAbsolutePath}", "--output", outputPath + ) ++ scalaJsOptions ++ Seq( jsBuild.target.getAbsolutePath) ++ jsBuild.dependencies.collect{case d: BoundMavenDependency => d.jar.getAbsolutePath}, - scalaJsCliDep.classLoader(jsBuild.context.classLoaderCache)) + scalaJsCliDep.classLoader(jsBuild.context.classLoaderCache) + ) + } + + def scalaJsOptions: Seq[String] = Seq() + def fastOptJS = { compile link(FastOptJS, fastOptOutput, scalaJsOptions) |