-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
051e538
commit efe2feb
Showing
10 changed files
with
91 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,41 @@ | ||
package definitions | ||
|
||
import org.scalajs.sbtplugin.ScalaJSPlugin | ||
import org.scalajs.sbtplugin.ScalaJSPlugin.autoImport._ | ||
import sbt.Keys._ | ||
import sbt._ | ||
import scommons.sbtplugin.project.CommonClientModule | ||
|
||
import scalajsbundler.sbtplugin.ScalaJSBundlerPlugin | ||
import scommons.sbtplugin.project.CommonClientModule | ||
import scoverage.ScoverageKeys.{coverageEnabled, coverageScalacPluginVersion} | ||
import scoverage.ScoverageSbtPlugin._ | ||
|
||
trait ScalaJsModule extends ReactModule { | ||
|
||
override def definition: Project = { | ||
super.definition | ||
.enablePlugins(ScalaJSPlugin, ScalaJSBundlerPlugin) | ||
.settings(CommonClientModule.settings: _*) | ||
.settings( | ||
//TODO: remove these temporal fixes for Scala.js 1.1+ and scoverage | ||
coverageScalacPluginVersion := { | ||
val current = coverageScalacPluginVersion.value | ||
if (scalaJSVersion.startsWith("0.6")) current | ||
else "1.4.2" //the only version that supports Scala.js 1.1+ | ||
}, | ||
libraryDependencies ~= { modules => | ||
if (scalaJSVersion.startsWith("0.6")) modules | ||
else modules.filter(_.organization != OrgScoverage) | ||
}, | ||
libraryDependencies ++= { | ||
if (coverageEnabled.value) { | ||
if (scalaJSVersion.startsWith("0.6")) Nil | ||
else Seq( | ||
OrgScoverage %% s"${ScalacRuntimeArtifact}_sjs1" % coverageScalacPluginVersion.value, | ||
OrgScoverage %% ScalacPluginArtifact % coverageScalacPluginVersion.value % ScoveragePluginConfig.name | ||
) | ||
} | ||
else Nil | ||
} | ||
) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters