Skip to content

Commit

Permalink
Doc: Add some ThirdParty plugins (#2905)
Browse files Browse the repository at this point in the history
Add [mill-missinglink](https://github.com/hoangmaihuy/mill-missinglink),
[mill-scala-tsi](https://github.com/hoangmaihuy/mill-scala-tsi) and
[mill-universal-packager](https://github.com/hoangmaihuy/mill-universal-packager)
to ThirdParty plugin doc.

Pull request: #2905
  • Loading branch information
hoangmaihuy authored Dec 5, 2023
1 parent b21ef92 commit 90e414c
Showing 1 changed file with 92 additions and 0 deletions.
92 changes: 92 additions & 0 deletions docs/modules/ROOT/pages/Thirdparty_Plugins.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -654,6 +654,28 @@ You can then check the binary compatibility of the module with:
Binary compatibility check passed.
----

== Missinglink

https://github.com/spotify/missinglink[missinglink] check for Mill, ported from https://github.com/scalacenter/sbt-missinglink[sbt-missinglink].

Project home: https://github.com/hoangmaihuy/mill-missinglink

_build.sc_:
[source,scala]
----
import $ivy.`io.github.hoangmaihuy::mill-missinglink::<latest-version>`
import io.github.hoangmaihuy.missinglink._
object example extends MissinglinkCheckModule
----

Runtime missinglink check command

[source,shell script]
----
> mill example.missinglinkCheck
----

== Native-Image

Build GraalVM Native-Image binaries with mill.
Expand Down Expand Up @@ -816,6 +838,53 @@ object main extends ScalaJSModule with ScalablyTyped {

It will run ScalablyTyped and add the converted dependencies to the module's `ivyDeps`.

== Scala TSI

https://github.com/scala-tsi/scala-tsi[scala-tsi] support for Mill

Project home: https://github.com/hoangmaihuy/mill-scala-tsi

_build.sc_:

[source,scala]
----
import $ivy.`io.github.hoangmaihuy::mill-scala-tsi::<latest-version>`
import io.github.hoangmaihuy.scalatsi._
object example extends ScalaModule with ScalaTsiModule {
// The classes that you want to generate typescript interfaces for
override def typescriptExports = Seq("MyClass")
// The output file which will contain the typescript interfaces
override def typescriptOutputFile = millSourcePath / "model.ts"
// Include the package(s) of the classes here
// Optionally import your own TSType implicits to override default default generated
override def typescriptGenerationImports = Seq("mymodel._", "MyTypescript._")
}
----

_MyClass.scala_:
[source,scala]
----
case class MyClass(foo: String, bar: Int)
----

Generate Typescript command:

[source,shell script]
----
> mill example.generateTypescript
----

_model.ts_:
[source]
----
export interface IMyClass {
foo: string
bar: number
}
----

== Scalafix

https://scalacenter.github.io/scalafix/[Scalafix] support for mill.
Expand Down Expand Up @@ -915,6 +984,29 @@ object app extends MavenModule with SpringBootModule {
$ mill app.springBootAssembly
----

== Universal Packager

Support universal archive packaging for Java application with Mill, ported from sbt-native-packager.

Project home: https://github.com/hoangmaihuy/mill-universal-packager

[source,scala,subs="attributes,verbatim"]
----
// build.sc
import $ivy.`io.github.hoangmaihuy::mill-universal-packager::<latest-version>`
import io.github.hoangmaihuy.mill.packager.archetypes.JavaAppPackagingModule
object example extends JavaAppPackagingModule {
override def packageVersion = "0.1.0"
}
----

[source,shell]
----
# Package as zip archive with Bash start script
$ mill example.universalPackage
----

== VCS Version

Expand Down

0 comments on commit 90e414c

Please sign in to comment.