Skip to content

Instantly share code, notes, and snippets.

@ebruchez
Created April 28, 2015 06:18
Show Gist options
  • Select an option

  • Save ebruchez/8a9af8c87fdf8beabfab to your computer and use it in GitHub Desktop.

Select an option

Save ebruchez/8a9af8c87fdf8beabfab to your computer and use it in GitHub Desktop.
val fastOptJSCombine = taskKey[File]("Combine -fastopt.js with -launcher.js.")
fastOptJSCombine := {
val fastOptFile = (fastOptJS in Compile).value.data
val outputDir = fastOptFile.getParentFile
val prefix = name.value.toLowerCase + "-"
val combinedFile = outputDir / (prefix + "combined.js")
val launcherFile = outputDir / (prefix + "launcher.js")
IO.delete(combinedFile)
IO.append(combinedFile, IO.readBytes(fastOptFile))
IO.append(combinedFile, IO.readBytes(launcherFile))
combinedFile
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment