我试图使用来自https://github.com/ground5hark/sbt-concat的 sbt-concat 插件。但是,我无法使用通配符。这是我的 build.sbt。
name := "webapp"
version := "1.0-SNAPSHOT"
scalaVersion := "2.10.4"
lazy val root = (project in file(".")).enablePlugins(PlayScala).enablePlugins(SbtTwirl).enablePlugins(SbtWeb)
resolvers += Resolver.sonatypeRepo("releases")
libraryDependencies ++= Seq(
cache,
filters,
"postgresql" % "postgresql" % "9.1-901.jdbc4",
"com.typesafe.play" %% "play-slick" % "0.7.0-M1",
"com.github.tminglei" %% "slick-pg" % "0.5.3",
"com.github.tminglei" %% "slick-pg_play-json" % "0.5.3",
"com.github.tminglei" %% "slick-pg_jts" % "0.5.3"
)
pipelineStages in Assets := Seq(concat)
Concat.groups := Seq(
"base.css" -> group(Seq("css/vendor/bootstrap/bootstrap.css")),
"lib.css" -> group((sourceDirectory.value / "assets" / "css" / "core" / "lib") * "*.css"),
"core.css" -> group(Seq("css/core/layout.css")),
"base.js" -> group(Seq("js/vendor/jquery/jquery.js", "js/vendor/jquery/jquery.qtip.js", "js/vendor/bootstrap/bootstrap.js")),
"lib.js" -> group((sourceDirectory.value / "assets" / "js" / "core" / "lib") * "*.js"),
"core.js" -> group(Seq("js/core/jy.js"))
)
请注意
"base.css" -> group(Seq("css/vendor/bootstrap/bootstrap.css"))
"base.js" -> group(Seq("js/vendor/jquery/jquery.js", "js/vendor/jquery/jquery.qtip.js", "js/vendor/bootstrap/bootstrap.js"))
工作正常。
但是,使用 sourceDirectory.value 的那个不起作用。有人有任何见解吗?