Created
August 14, 2015 02:17
-
-
Save chandu0101/a92a9d7fd60ac741ca41 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val customFullOpt = Def.taskKey[File]("Generate the file ..") | |
artifactPath in Compile in customFullOpt := | |
baseDirectory.value / "final-bundle.js", | |
customFullOpt in Compile := { | |
val outFile = (artifactPath in Compile in customFullOpt).value | |
val loaderFile = (resourceDirectory in Compile).value / "loader.js" // file to prepended | |
IO.copyFile(loaderFile, outFile) | |
val fullOutputCode = IO.read((fullOptJS in Compile).value.data) | |
IO.append(outFile, fullOutputCode) // add fullopt output | |
val launcher = (scalaJSLauncher in Compile).value.data.content | |
IO.append(outFile, launcher) // add launcher code too | |
outFile | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment