Skip to content

Commit

Permalink
Merge pull request #34 from japgolly/sourcemaps
Browse files Browse the repository at this point in the history
Use Github URL in source maps
  • Loading branch information
lihaoyi committed Nov 18, 2014
2 parents 35e2f1e + 8db2104 commit 21c440f
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion project/Build.scala
Original file line number Diff line number Diff line change
Expand Up @@ -113,11 +113,20 @@ object Build extends sbt.Build{

)

def sourceMapsToGithub: Project => Project =
p => p.settings(
scalacOptions ++= (if (isSnapshot.value) Seq.empty else Seq({
val a = p.base.toURI.toString.replaceFirst("[^/]+/?$", "")
val g = "https://raw.githubusercontent.com/lihaoyi/upickle"
s"-P:scalajs:mapSourceURI:$a->$g/v${version.value}/"
}))
)

lazy val root = cross.root

lazy val js = cross.js.settings(
(jsEnv in Test) := new NodeJSEnv
)
).configure(sourceMapsToGithub)

lazy val jvm = cross.jvm.settings(
libraryDependencies += "org.spire-math" %% "jawn-parser" % "0.6.0"
Expand Down

0 comments on commit 21c440f

Please sign in to comment.