swachter / scala-ts

33 stars 2 forks source link

artifactPath being changed in plugin, can break build #1

Closed aappddeevv closed 4 years ago

aappddeevv commented 4 years ago
artifactPath in fastOptJS in Compile := scalaTsOutputDir.value / (scalaTsFilenamePrefix.value + ".js"),
artifactPath in fullOptJS in Compile := scalaTsOutputDir.value / (scalaTsFilenamePrefix.value + ".js"),

Is there a way to do this without changing the artifactPath value? That's changed by other plugins I have as part of a unified build.

swachter commented 4 years ago

Good point. I think that the ScalaTsPlugin does not need output configuration.

It can write the .d.ts file in the directory the JavaScript output is written to. In addition, the generated package.json can always reference the JavaScript artifact file name.

In addition, I think it would be best, if the scalaTsPackage task would be automatically added after the fullOptJS and fastOptJS tasks.

swachter commented 4 years ago

The ScalaTsPlugin does no more configure the artifactPath. It uses the artifactPath of ScalaJS and places its files as siblings.

The crossTarget setting can be used to configure the output directory of fastOptJS/fullOptJS thereby also configuring the ScalaTs output.

(Released in 0.3)