All Downloads are FREE. Search and download functionalities are using the official Maven repository.

mill.scalajslib.api.Report.scala Maven / Gradle / Ivy

There is a newer version: 0.12.2-20-231ff6
Show newest version
package mill.scalajslib.api

import upickle.default.{ReadWriter => RW, macroRW}

final class Report private (val publicModules: Iterable[Report.Module], val dest: mill.PathRef) {
  override def toString(): String =
    s"""Report(
       |  publicModules = $publicModules,
       |  dest = $dest
       |)""".stripMargin
}
object Report {
  final class Module private (
      val moduleID: String,
      val jsFileName: String,
      val sourceMapName: Option[String],
      val moduleKind: ModuleKind
  ) {
    override def toString(): String =
      s"""Module(
         |  moduleID = $moduleID,
         |  jsFileName = $jsFileName,
         |  sourceMapName = $sourceMapName,
         |  moduleKind = $moduleKind
         |)""".stripMargin
  }
  object Module {
    def apply(
        moduleID: String,
        jsFileName: String,
        sourceMapName: Option[String],
        moduleKind: ModuleKind
    ): Module =
      new Module(
        moduleID = moduleID,
        jsFileName = jsFileName,
        sourceMapName = sourceMapName,
        moduleKind = moduleKind
      )
    implicit val rw: RW[Module] = macroRW[Module]
  }
  def apply(publicModules: Iterable[Report.Module], dest: mill.PathRef): Report =
    new Report(publicModules = publicModules, dest = dest)
  implicit val rw: RW[Report] = macroRW[Report]
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy