<commit_before>
//uncomment to enable SASS
//import com.typesafe.sbt.web.SbtWeb
import org.scalajs.sbtplugin.cross.CrossProject
import sbt._
import Keys._
import Tests._
import org.scalajs.sbtplugin.ScalaJSPlugin
import org.scalajs.sbtplugin.ScalaJSPlugin.autoImport._
import sbt.Project.projectToRef
import UDashBuild._

object Build extends sbt.Build {


  /** codegen project containing the customized code generator */
  lazy val codegen: Project  = (project in file("codegen")).settings(
    name := "codegen",
    scalaVersion := Settings.versions.scala,
    libraryDependencies ++= Settings.codegenDependecies.value,
    resolvers += Resolver.jcenterRepo,
    resourceDirectory in Compile := baseDirectory.value / "../resources"
  )

  lazy val server: Project  = (project in file("server"))
    .settings(
      name := "server",
      version := Settings.version,
      scalaVersion := Settings.versions.scala,
      //resolvers += "nightlies" at "https://scala-ci.typesafe.com/artifactory/scala-release-temp/",
      //scalaVersion := "2.12.5-bin-2791989",
      scalaBinaryVersion := "2.12",
      scalacOptions ++= Settings.scalacOptionsServer,
      libraryDependencies ++= Settings.jvmDependencies.value,
      resolvers += Resolver.jcenterRepo,
      slick <<= slickCodeGenTask, // register manual sbt command
      sourceGenerators in Compile <+= slickCodeGenTask, // register automatic code generation on every compile, comment this line for only manual use
      resourceDirectory in Compile := baseDirectory.value / "../resources",
      testOptions in Test += Tests.Argument(TestFrameworks.Specs2, "html")
    )
    .aggregate(clients.map(projectToRef): _*)
    .dependsOn(sharedJVM)
    .dependsOn(codegen)

  lazy val client: Project = (project in file("client"))
    .settings(
      name := "client",
      version := Settings.version,
      scalaVersion := Settings.versions.scala,
      scalacOptions ++= Settings.scalacOptions,
      libraryDependencies ++= Settings.scalajsDependencies.value,
      jsDependencies ++= Settings.jsDependencies.value,
      // RuntimeDOM is needed for tests
      jsDependencies += RuntimeDOM % "test",
      // yes, we want to package JS dependencies
      skip in packageJSDependencies := false,
      // use Scala.js provided launcher code to start the client app
      persistLauncher := true,
      persistLauncher in Test := false,
      fork in fastOptJS := true,
      fork in fullOptJS := true,
      javaOptions in fastOptJS += "-Xmx4G -XX:MaxMetaspaceSize=1G -XX:MaxPermSize=1G -XX:+CMSClassUnloadingEnabled -Xss3m",
      javaOptions in fullOptJS += "-Xmx4G -XX:MaxMetaspaceSize=1G -XX:MaxPermSize=1G -XX:+CMSClassUnloadingEnabled -Xss3m",
      // use uTest framework for tests
      testFrameworks += new TestFramework("utest.runner.Framework"),
      //jsEnv in Test := new org.scalajs.jsenv.selenium.SeleniumJSEnv(org.scalajs.jsenv.selenium.Chrome()),
      requiresDOM := true,
      // Compile tests to JS using fast-optimisation
      scalaJSStage in Test := FastOptStage,
      fullClasspath in Test ~= { _.filter(_.data.exists) },<commit_msg>don't compile the client when specified to compile only the server<commit_after>
//uncomment to enable SASS
//import com.typesafe.sbt.web.SbtWeb
import org.scalajs.sbtplugin.cross.CrossProject
import sbt._
import Keys._
import Tests._
import org.scalajs.sbtplugin.ScalaJSPlugin
import org.scalajs.sbtplugin.ScalaJSPlugin.autoImport._
import sbt.Project.projectToRef
import UDashBuild._

object Build extends sbt.Build {


  /** codegen project containing the customized code generator */
  lazy val codegen: Project  = (project in file("codegen")).settings(
    name := "codegen",
    scalaVersion := Settings.versions.scala,
    libraryDependencies ++= Settings.codegenDependecies.value,
    resolvers += Resolver.jcenterRepo,
    resourceDirectory in Compile := baseDirectory.value / "../resources"
  )

  lazy val server: Project  = (project in file("server"))
    .settings(
      name := "server",
      version := Settings.version,
      scalaVersion := Settings.versions.scala,
      //resolvers += "nightlies" at "https://scala-ci.typesafe.com/artifactory/scala-release-temp/",
      //scalaVersion := "2.12.5-bin-2791989",
      scalaBinaryVersion := "2.12",
      scalacOptions ++= Settings.scalacOptionsServer,
      libraryDependencies ++= Settings.jvmDependencies.value,
      resolvers += Resolver.jcenterRepo,
      slick <<= slickCodeGenTask, // register manual sbt command
      sourceGenerators in Compile <+= slickCodeGenTask, // register automatic code generation on every compile, comment this line for only manual use
      resourceDirectory in Compile := baseDirectory.value / "../resources",
      testOptions in Test += Tests.Argument(TestFrameworks.Specs2, "html")
    )
    //.aggregate(clients.map(projectToRef): _*)
    .dependsOn(sharedJVM)
    .dependsOn(codegen)

  lazy val client: Project = (project in file("client"))
    .settings(
      name := "client",
      version := Settings.version,
      scalaVersion := Settings.versions.scala,
      scalacOptions ++= Settings.scalacOptions,
      libraryDependencies ++= Settings.scalajsDependencies.value,
      jsDependencies ++= Settings.jsDependencies.value,
      // RuntimeDOM is needed for tests
      jsDependencies += RuntimeDOM % "test",
      // yes, we want to package JS dependencies
      skip in packageJSDependencies := false,
      // use Scala.js provided launcher code to start the client app
      persistLauncher := true,
      persistLauncher in Test := false,
      fork in fastOptJS := true,
      fork in fullOptJS := true,
      javaOptions in fastOptJS += "-Xmx4G -XX:MaxMetaspaceSize=1G -XX:MaxPermSize=1G -XX:+CMSClassUnloadingEnabled -Xss3m",
      javaOptions in fullOptJS += "-Xmx4G -XX:MaxMetaspaceSize=1G -XX:MaxPermSize=1G -XX:+CMSClassUnloadingEnabled -Xss3m",
      // use uTest framework for tests
      testFrameworks += new TestFramework("utest.runner.Framework"),
      //jsEnv in Test := new org.scalajs.jsenv.selenium.SeleniumJSEnv(org.scalajs.jsenv.selenium.Chrome()),
      requiresDOM := true,
      // Compile tests to JS using fast-optimisation
      scalaJSStage in Test := FastOptStage,
      fullClasspath in Test ~= { _.filter(_.data.exists) },
{'fraction_non_alphanumeric': 0.11096999523733926, 'fraction_numerical': 0.007302746467693285, 'mean_word_length': 3.490377761938703, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3784287', 'n_tokens_mistral': 1906, 'n_tokens_neox': 1838, 'n_words': 464}