Skip to content

Commit

Permalink
Publish with remote source maps (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
japgolly committed Sep 7, 2014
1 parent 1b1ce1f commit 1541a16
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion project/Build.scala
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ object ScalajsReact extends Build {
_.settings(
publishTo := {
val nexus = "https://oss.sonatype.org/"
if (version.value.trim endsWith "SNAPSHOT")
if (isSnapshot.value)
Some("snapshots" at nexus + "content/repositories/snapshots")
else
Some("releases" at nexus + "service/local/staging/deploy/maven2")
Expand All @@ -53,6 +53,16 @@ object ScalajsReact extends Build {
<name>David Barri</name>
</developer>
</developers>)
.configure(sourceMapsToGithub)

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

def utestSettings: PE =
_.settings(utest.jsrunner.Plugin.utestJsSettings: _*)
Expand Down

0 comments on commit 1541a16

Please sign in to comment.