Skip to content

Commit

Permalink
Make resource concat OS portable
Browse files Browse the repository at this point in the history
Given the known issue on sbt-concat (sbt/sbt-concat#21) the paths must be built on-the-fly with a system specific `File.separator`
  • Loading branch information
ignasi35 committed Mar 2, 2017
1 parent 6db2c62 commit 0dd0e63
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -92,19 +92,21 @@ generateHtml <<= Def.taskDyn {
}
}

def path(segments: String*): String = segments.mkString(java.io.File.separator)

Concat.groups := Seq(
s"$assetFingerPrint-all-styles-concat.css" -> group(Seq(
"lib/foundation/dist/foundation.min.css",
"lib/prettify/prettify.css",
path("lib", "foundation", "dist", "foundation.min.css"),
path("lib", "prettify", "prettify.css"),
"main.min.css"
)),
s"$assetFingerPrint-all-scripts-concat.js" -> group(Seq(
"lib/jquery/jquery.min.js",
"lib/foundation/dist/foundation.min.js",
"lib/waypoints/lib/jquery.waypoints.min.js",
"lib/waypoints/lib/shortcuts/sticky.min.js",
"lib/prettify/prettify.js",
"lib/prettify/lang-scala.js",
path("lib", "jquery", "jquery.min.js"),
path("lib", "foundation", "dist", "foundation.min.js"),
path("lib", "waypoints", "lib", "jquery.waypoints.min.js"),
path("lib", "waypoints", "lib", "shortcuts", "sticky.min.js"),
path("lib", "prettify", "prettify.js"),
path("lib", "prettify", "lang-scala.js"),
"main.min.js"
))
)
Expand Down

0 comments on commit 0dd0e63

Please sign in to comment.