Packages

package tut

Type Members

  1. trait TutModule extends Module with ScalaModule

    Tut is a documentation tool which compiles and evaluates Scala code in documentation files and provides various options for configuring how the results will be displayed in the compiled documentation.

    Tut is a documentation tool which compiles and evaluates Scala code in documentation files and provides various options for configuring how the results will be displayed in the compiled documentation.

    Extending this trait declares a Scala module which compiles markdown, HTML and .txt files in the tut folder of the module with Tut.

    By default the resulting documents are simply placed in the Mill build output folder but they can be placed elsewhere by overriding the mill.contrib.tut.TutModule#tutTargetDirectory task.

    For example:

    // build.sc
    import mill._, scalalib._, contrib.tut.__
    
    object example extends TutModule {
      def scalaVersion = "2.12.6"
      def tutVersion = "0.6.7"
    }

    This defines a project with the following layout:

    build.sc
    example/
        src/
        tut/
        resources/

    In order to compile documentation we can execute the tut task in the module:

    sh> mill example.tut

Ungrouped