I have a problem with the sbt-concat plugin that I use to group my entire JS file into assets / javascripts. The problem is that it is not grouped in the correct order.
Basically, my tree looks like this:
-assets
--javascripts
And the created file, thanks to sbt-concat, loads controller.js in front of app.js, which obviously cause the controller to crash.
Here is my plugin.sbt:
addSbtPlugin("com.typesafe.sbt" % "sbt-digest" % "1.1.0")
addSbtPlugin("com.typesafe.sbt" % "sbt-gzip" % "1.0.0")
addSbtPlugin("com.typesafe.sbt" % "sbt-uglify" % "1.0.3")
addSbtPlugin("net.ground5hark.sbt" % "sbt-concat" % "0.1.8")
and my build.sbt:
Concat.groups := Seq(
"scripts.js" -> group(((sourceDirectory in Assets).value / "javascripts") ** "*.js")
)
Concat.parentDir := "javascripts"
includeFilter in uglify := GlobFilter("scripts.js")
pipelineStages in Assets := Seq(concat, uglify, digest, gzip)
So everything works fine, except that app.js does not load at first, this is the only thing I need to download first, if any of you have an idea just for that, that would be awesome! Thanks: D
source
share