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

mdoc.docs.SbtModifier.scala Maven / Gradle / Ivy

The newest version!
package mdoc.docs

import mdoc.Reporter
import mdoc.StringModifier
import mdoc.MdocPlugin.autoImport._
import scala.meta.inputs.Input

class SbtModifier extends StringModifier {
  override val name: String = "sbt"

  override def process(info: String, code: Input, reporter: Reporter): String = {
    val keys = List(
      mdoc,
      mdocIn,
      mdocOut,
      mdocVariables,
      mdocExtraArguments,
      mdocJS,
      mdocJSLibraries,
      mdocAutoDependency
    )
    val rows = keys.map { s =>
      val tpe = s.key.manifest
        .toString()
        .replaceAllLiterally("java.lang.String", "String")
        .replaceAllLiterally("scala.collection.immutable.", "")
        .replaceAllLiterally("scala.collection.", "")
        .replaceAllLiterally("sbt.internal.util.", "")
        .replaceAllLiterally("sbt.", "")
        .replaceAllLiterally("scala.", "")
        .replaceAllLiterally("java.io.", "")
      
        {s.key.toString}
        {tpe}
        {s.key.description.getOrElse("")}
      
    }
    
      {rows}
    
Task Type Description
}.toString() + "\n\n" }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy