Proof of concept - a portable application in Scala/JVM, Scala.js & Scala Native
Clone:
git clone https://github.com/writeonly/resentiment.git
cd resentiment
Refactor and reformat:
sbt scalafix test:scalafix it:scalafix &&
sbt scalafmtSbt scalafmt test:scalafmt it:scalafmt
Check lint and format:
sbt 're/scalafix --check' 're/test:scalafix --check' 're/it:scalafix --check' &&
sbt scalafmtSbtCheck re/scalafmtCheck re/test:scalafmtCheck re/it:scalafmtCheck
Compile, test and generate coverage report:
sbt clean compile test:compile it:compile re/test &&
sbt coverage reJS/test reJVM/test reJS/it:test reJVM/it:test coverageReport &&
sbt coverageAggregate
Check:
sbt scalastyle test:scalastyle it:scalastyle &&
sbt scapegoat cpd stats
All:
sbt re/scalafix re/test:scalafix re/it:scalafix &&
sbt re/scalafmtSbt re/scalafmt re/test:scalafmt re/it:scalafmt &&
sbt clean re/compile re/test:compile re/it:compile re/test &&
sbt coverage reJS/test reJVM/test reJS/it:test reJVM/it:test coverageReport &&
sbt coverageAggregate &&
sbt scalastyle test:scalastyle it:scalastyle &&
sbt scapegoat cpd stats
All for travis-ci (without Scala Native):
sbt 'scalafix --check' 'test:scalafix --check' 'it:scalafix --check' &&
sbt scalafmtCheck test:scalafmtCheck it:scalafmtCheck &&
sbt clean re/compile re/test:compile re/it:compile &&
sbt coverage reJS/test reJVM/test reJS/it:test reJVM/it:test coverageReport &&
sbt coverageAggregate &&
sbt scalastyle test:scalastyle it:scalastyle &&
sbt scapegoat cpd stats
Only Scala Native:
sbt re/scalafix re/test:scalafix re/it:scalafix &&
sbt re/scalafmtSbt re/scalafmt re/test:scalafmt re/it:scalafmt &&
sbt clean re/compile re/test:compile re/it:compile re/test &&
sbt scalastyle test:scalastyle it:scalastyle &&
sbt scapegoat cpd stats
Run:
sbt reJS/run # run Scala JS
sbt reJVM/run # run Scala JVM
sbt re/run # run Scala Native
Or all runs:
sbt reJS/run reJVM/run re/run