name := "scyig-judicial"

organization := "me.frmr.scyig"

version := "0.0.1-SNAPSHOT"

scalaVersion := "2.12.2"

scalacOptions in Compile ++= Seq("-feature", "-deprecation")

libraryDependencies ++= {
  val liftVersion = "3.2.0-M1"

  Seq(
    "net.liftweb"                   %% "lift-webkit"          % liftVersion,
    "com.typesafe.slick"            %% "slick"                % "3.2.0",
    "mysql"                         % "mysql-connector-java"  % "8.0.7-dmr",
    "ch.qos.logback"                % "logback-classic"       % "1.2.3",
    "org.scalatest"                 %% "scalatest"            % "3.0.1" % "test",
    "org.scalacheck"                %% "scalacheck"           % "1.13.4" % "test"
  )
}

enablePlugins(JettyPlugin)

name := "scyig-judicial"

organization := "me.frmr.scyig"

version := "0.0.1-SNAPSHOT"

scalaVersion := "2.12.2"

scalacOptions in Compile ++= Seq("-feature", "-deprecation")

libraryDependencies ++= {
  val liftVersion = "3.2.0-M1"

  Seq(
    "net.liftweb"                   %% "lift-webkit"          % liftVersion,
    "com.typesafe.slick"            %% "slick"                % "3.2.0",
    "mysql"                         % "mysql-connector-java"  % "8.0.7-dmr",
    "ch.qos.logback"                % "logback-classic"       % "1.2.3",
    "org.scalatest"                 %% "scalatest"            % "3.0.1" % "test",
    "org.scalacheck"                %% "scalacheck"           % "1.13.4" % "test"
  )
}

enablePlugins(JettyPlugin)

webappPostProcess := { webappDir: File =>
  def recurseFiles(rootDir: File, targetDir: File, extension: String, handler: (String, String, String)=>Unit): Unit = {
    if (! rootDir.isDirectory || ! targetDir.isDirectory) {
      streams.value.log.error(s"$rootDir and $targetDir must both be directories")
    } else {
      for {
        file <- rootDir.listFiles if file.getName.endsWith(extension)
      } {
        streams.value.log.info(s"Processing ${file.getPath}...")
        handler(
          rootDir.toString,
          file.getName,
          targetDir.toString
        )
      }
    }
  }

  def compileScss(inputDir: String, inputFile: String, outputDir: String): Unit = {
    val outputFilename = inputFile.replace(".scss", ".css")
    s"scss $inputDir/$inputFile $outputDir/$outputFilename" ! streams.value.log
  }

  recurseFiles(
    webappDir / "scss-hidden",
    webappDir / "css",
    ".scss",
    compileScss _
  )
}

Support scss compilation from scss-hidden
Support scss compilation from scss-hidden
