Skip to content

Commit 4c9bce9

Browse files
committed
Cross compile to scalajs
1 parent ea2ba0a commit 4c9bce9

File tree

4 files changed

+16
-5
lines changed

4 files changed

+16
-5
lines changed

build.sbt

+11-4
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,16 @@ scalacOptions ++= Seq("-deprecation", "-feature", "-unchecked")
99
javacOptions ++= Seq("-source", "1.8", "-target", "1.8")
1010

1111
// Scala 2.11+ core does not include scala.util.parsing.combinator
12-
libraryDependencies += "org.scala-lang.modules" %% "scala-parser-combinators" % "1.1.2"
12+
libraryDependencies += "org.scala-lang.modules" %%% "scala-parser-combinators" % "1.1.2"
1313

14-
libraryDependencies += "org.specs2" %% "specs2-core" % "4.6.0" % "test"
14+
libraryDependencies += "org.specs2" %%% "specs2-core" % "4.10.2" % "test"
1515

16-
//https://github.com/scala/scala-parser-combinators/issues/197
17-
fork in Test := true
16+
lazy val scaposer = crossProject(JVMPlatform, JSPlatform)
17+
.crossType(CrossType.Pure)
18+
19+
lazy val scaposerJS = scaposer.js
20+
lazy val scaposerJVM = scaposer.jvm
21+
22+
lazy val root = (project in file("."))
23+
.aggregate(scaposerJS, scaposerJVM)
24+
.settings(skip in publish := true)

jitpack.yml

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
install:
2+
- sbt +publishM2

project/build.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
sbt.version=0.13.18
1+
sbt.version=1.3.12

project/plugins.sbt

+2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
// Run sbt eclipse to create Eclipse project file
22
addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "5.2.4")
3+
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.1.1")
4+
addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.0.0")

0 commit comments

Comments
 (0)