File tree 1 file changed +19
-12
lines changed
1 file changed +19
-12
lines changed Original file line number Diff line number Diff line change 1
1
import scalatex .ScalatexReadme
2
2
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)
5
22
6
23
name := " Scala.js DOM"
7
24
@@ -22,16 +39,6 @@ homepage := Some(url("http://scala-js.org/"))
22
39
23
40
licenses += (" MIT" , url(" http://opensource.org/licenses/mit-license.php" ))
24
41
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
-
35
42
def hasNewCollections (version : String ): Boolean = {
36
43
! version.startsWith(" 2.11." ) &&
37
44
! version.startsWith(" 2.12." )
You can’t perform that action at this time.
0 commit comments