Skip to content

Instantly share code, notes, and snippets.

@elyphas
Created July 9, 2018 14:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save elyphas/e0158d5d6190470b3159cfb14cf157bf to your computer and use it in GitHub Desktop.
Save elyphas/e0158d5d6190470b3159cfb14cf157bf to your computer and use it in GitHub Desktop.
import sbt._
import org.scalajs.sbtplugin.ScalaJSPlugin.autoImport._
/**
* Application settings. Configure the build for your application here.
* You normally don't have to touch the actual build definition after this.
*/
object Settings {
/** The name of your application */
val name = "Sicap"
/** The version of your application */
val version = "1.1.5"
/** Options for the scala compiler */
val scalacOptions = Seq(
"-Xlint",
"-unchecked",
"-deprecation",
"-feature",
"-Ypartial-unification"
)
/** Declare global dependency versions here to avoid mismatches in multi part dependencies */
object versions {
val scala = "2.12.4" //"2.12.1" //"2.11.11"
val scalaDom = "0.9.6" //"0.9.4" //"0.9.2"
val scalajsReact = "1.2.0" //"1.2.0" "1.1.1"
val scalaCSS = "0.5.5" //"0.5.3"
val log4js = "1.4.10"
val autowire = "0.2.6"
val booPickle = "1.2.6"
val diode = "1.1.3" //"1.1.2"
val uTest = "0.4.7"
val react = "16.2.0" //"15.6.1" //"15.5.4"
val jQuery = "1.11.1"
val bootstrap = "4.1.1" //"3.3.6" "4.1.1"
val scalajsScripts = "1.1.2" //"1.1.0" //"1.0.0"
val monocle = "1.5.0"
}
/**These dependencies are shared between JS and JVM projects
* the special %%% function selects the correct version for each project
*/
val sharedDependencies = Def.setting(Seq(
"com.lihaoyi" %%% "autowire" % versions.autowire,
"io.suzaku" %%% "boopickle" % versions.booPickle,
"org.typelevel" %%% "cats-core" % "1.1.0"
))
/** Dependencies only used by the JVM project */
val jvmDependencies = Def.setting(Seq(
"com.vmunier" %% "scalajs-scripts" % versions.scalajsScripts,
"org.webjars" % "font-awesome" % "4.3.0-1" % Provided, //"5.1.0" % Provided,
"org.webjars" % "bootstrap" % versions.bootstrap % Provided,
"com.lihaoyi" %% "utest" % versions.uTest % Test,
"com.typesafe.play" %% "play-slick" % "3.0.3",
"org.postgresql" % "postgresql" % "9.4-1206-jdbc42",
"com.chuusai" %% "shapeless" % "2.3.3",
"io.underscore" %% "slickless" % "0.3.3"
))
/** Dependencies only used by the JS project (note the use of %%% instead of %%) */
val scalajsDependencies = Def.setting(Seq(
//"org.scala-js" % "scalajs-java-time_sjs0.6_2.11" % "0.2.0",
"com.github.japgolly.scalajs-react" %%% "core" % versions.scalajsReact,
"com.github.japgolly.scalajs-react" %%% "extra" % versions.scalajsReact,
//"com.olvind" %%% "scalajs-react-components" % "0.7.0",
"com.olvind" %%% "scalajs-react-components" % "1.0.0-M2",
"com.github.japgolly.scalacss" %%% "ext-react" % versions.scalaCSS,
"io.suzaku" %%% "diode" % versions.diode,
"io.suzaku" %%% "diode-react" % "1.1.3.120",
"org.scala-js" %%% "scalajs-dom" % versions.scalaDom,
"com.lihaoyi" %%% "utest" % versions.uTest % Test,
"org.akka-js" %%% "akkajsactor" % "1.2.5.11",
"com.github.japgolly.scalajs-react" %%% "ext-monocle" % "1.1.1",
"com.github.julien-truffaut" %% "monocle-core" % versions.monocle,
"com.github.julien-truffaut" %% "monocle-macro" % versions.monocle,
"com.github.julien-truffaut" %% "monocle-law" % versions.monocle % "test"
))
/** Dependencies for external JS libs that are bundled into a single .js file according to dependency order */
val jsDependencies = Def.setting(Seq(
/*"org.webjars.bower" % "react" % versions.react / "react-with-addons.js" minified "react-with-addons.min.js" commonJSName "React",
"org.webjars.bower" % "react" % versions.react / "react-dom.js" minified "react-dom.min.js" dependsOn "react-with-addons.js" commonJSName "ReactDOM",*/
"org.webjars.npm" % "react" % "16.2.0"
/ "umd/react.development.js"
minified "umd/react.production.min.js"
commonJSName "React",
"org.webjars.npm" % "react-dom" % "16.2.0"
/ "umd/react-dom.development.js"
minified "umd/react-dom.production.min.js"
dependsOn "umd/react.development.js"
commonJSName "ReactDOM",
"org.webjars.npm" % "react-dom" % "16.2.0"
/ "umd/react-dom-server.browser.development.js"
minified "umd/react-dom-server.browser.production.min.js"
dependsOn "umd/react-dom.development.js"
commonJSName "ReactDOMServer",
"org.webjars.bower" % "pdfmake" % "0.1.36" / "pdfmake.js" minified "pdfmake.min.js" commonJSName "pdfmake",
"org.webjars" % "jquery" % versions.jQuery / "jquery.js" minified "jquery.min.js",
"org.webjars" % "bootstrap" % versions.bootstrap / "bootstrap.js" minified "bootstrap.min.js" dependsOn "jquery.js",
"org.webjars" % "log4javascript" % versions.log4js / "js/log4javascript_uncompressed.js" minified "js/log4javascript.js"
))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment