File tree Expand file tree Collapse file tree 1 file changed +19
-12
lines changed Expand file tree Collapse file tree 1 file changed +19
-12
lines changed Original file line number Diff line number Diff line change 11import scalatex .ScalatexReadme
22
3- lazy val root = project.in(file(" ." )).
4- enablePlugins(ScalaJSPlugin )
3+ def sourceMapsToGithub : Project => Project =
4+ p => p.settings(
5+ scalacOptions ++= {
6+ val isDotty = scalaVersion.value startsWith " 3"
7+ val ver = version.value
8+ if (isSnapshot.value)
9+ Nil
10+ else {
11+ val a = p.base.toURI.toString.replaceFirst(" [^/]+/?$" , " " )
12+ val g = s " https://raw.githubusercontent.com/scala-js/scala-js-dom "
13+ val flag = if (isDotty) " -scalajs-mapSourceURI" else " -P:scalajs:mapSourceURI"
14+ s " $flag: $a-> $g/v $ver/ " :: Nil
15+ }
16+ }
17+ )
18+
19+ lazy val root = project.in(file(" ." ))
20+ .enablePlugins(ScalaJSPlugin )
21+ .configure(sourceMapsToGithub)
522
623name := " Scala.js DOM"
724
@@ -22,16 +39,6 @@ homepage := Some(url("http://scala-js.org/"))
2239
2340licenses += (" MIT" , url(" http://opensource.org/licenses/mit-license.php" ))
2441
25- scalacOptions ++= {
26- if (isSnapshot.value)
27- Seq .empty
28- else {
29- val a = baseDirectory.value.toURI
30- val g = " https://raw.githubusercontent.com/scala-js/scala-js-dom"
31- Seq (s " -P:scalajs:mapSourceURI: $a-> $g/v ${version.value}/ " )
32- }
33- }
34-
3542def hasNewCollections (version : String ): Boolean = {
3643 ! version.startsWith(" 2.11." ) &&
3744 ! version.startsWith(" 2.12." )
You can’t perform that action at this time.
0 commit comments