--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/build.sc Wed Aug 28 20:56:00 2019 +0200
@@ -0,0 +1,62 @@
+import mill._
+import mill.api.Loose
+import mill.define.Target
+import mill.scalajslib._
+import mill.scalalib._
+import mill.scalalib.publish._
+
+object V {
+ val visjs = "0.1-SNAPSHOT"
+ val scalaJs = "0.6.28"
+ val scala211 = "2.11.12"
+ val scala212 = "2.12.9"
+}
+
+object D {
+ val scalaJsDom = ivy"org.scala-js::scalajs-dom::0.9.7"
+}
+
+class VisJs(val crossScalaVersion: String) extends CrossScalaModule with
+ ScalaJSModule with PublishModule {
+
+ override def artifactName: T[String] = "visjs"
+
+ override def scalaJSVersion: Target[String] = V.scalaJs
+
+ override def publishVersion: Target[String] = V.visjs
+
+ override def pomSettings = PomSettings(
+ description = "Scala.js library facade for vis.js",
+ organization = "cz.functionals",
+ url = "https://functionals.cz/project/visjs",
+ licenses = Seq(License.`Apache-2.0`),
+ versionControl = VersionControl(developerConnection = Some(
+ "ssh://hg@functionals.cz/visjs")),
+ developers = Seq(
+ Developer("tzeman", "Tomas Zeman", "")
+ )
+ )
+
+ override def scalacOptions = T{Seq(
+ "-deprecation", // Emit warning and location for usages of deprecated APIs.
+ "-encoding", "utf-8", // Specify character encoding used by source files.
+ "-explaintypes", // Explain type errors in more detail.
+ "-feature", // Emit warning and location for usages of features that should be imported explicitly.
+ "-language:higherKinds", // Allow higher-kinded types
+ "-language:implicitConversions", // Allow definition of implicit functions called views
+ "-language:reflectiveCalls",
+ "-language:postfixOps",
+ "-unchecked", // Enable additional warnings where generated code depends on assumptions.
+ "-Xcheckinit", // Wrap field accessors to throw an exception on uninitialized access.
+ "-Xfuture", // Turn on future language features.
+ "-target:jvm-1.8",
+ "-P:scalajs:sjsDefinedByDefault"
+ )}
+
+ override def ivyDeps: Target[Loose.Agg[Dep]] = Agg(D.scalaJsDom)
+
+}
+
+object visjs extends Cross[VisJs](V.scala211, V.scala212)
+
+// vim: et ts=2 sw=2 syn=scala