copying scala.js linker artifacts after linking
copying scala.js linker artifacts after linking There have been a few requests for a plugin to copy the scala.js linker artifacts to another location after the linker has run. While you could set the output path for the artifact to a different location, you may want to have the artifacts generated into the standard location then copy it to somewhere else to provide better compatibility with existing tooling. Ad-hoc Approach Here’s one way to add a copy process to a specific sub-project: def copyTask ( odir : String ) = { lazy val copyJSOutput = taskKey [ Unit ] ( "copy scala.js linker outputs to another location" ) Seq ( copyJSOutput : = { println ( s "Copying artifact ${scalaJSLinkedFile.in(Compile).value.path} to [${odir}]" ) val src = file ( scalaJSLinkedFile . in ( Compile ) . value . path ) IO . copy ( Seq ( ( src , file ( odir ) / src . name ) , ( file ( src . getCanonicalP...