random-maven / scalor-maven-plugin

Build integrator for Java, Scala, Scala.macro, Scala.js, Scala.native, Eclipse and Maven.
https://random-maven.github.io/scalor-maven-plugin/2.12/plugin-info.html
Other
50 stars 6 forks source link

Provide Scala.js sbt plugin to Maven translation guide #20

Closed PaulAtBanno closed 6 years ago

PaulAtBanno commented 6 years ago

Consider the build.sbt from scalajs-react-template. For the most part, it's just dependencies, and translating them to Maven using scalor-maven-plugin is straightforward.

There are basically at least three other concerns:

  1. Settings such as packageJSDependencies. jsDependencies, etc.
  2. Scoping those Settings per task, such as fastOptJS in Compile scope.
  3. Providing some equivalent to Workbench for rapid iteration of Scala.js projects in Maven.

1 and 2 can probably be addressed with a Wiki page describing how the sbt plugin settings map to arguments in the scalor plugin. 3 might be addressed by using Eclipse and building on save, but it's not clear to me how scalor plugin settings are being reflected as Eclipse project settings such that e.g. an HTML page referring by relative path to the local compile target will be pointing to where the pom.xml says rather than whatever the default target path is after Eclipse imports a Maven project.

More generally, it would be nice if there were more standalone examples than the demo and the scalor-maven-plugin project itself, and ideally, if some of these examples were conversions of Scala.js projects in sbt, for comparison's sake.