generated from indoorvivants/scala-library-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
30 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,44 @@ | ||
## Scala Library template | ||
## Yank | ||
|
||
This is a template repository with some of the learnings from OSS Scala ecosystem applied. | ||
Very simple JVM micro-library for downloading self-contained tools from other | ||
ecosystems. | ||
|
||
<!--toc:start--> | ||
- [Yank](#yank) | ||
- [Tailwind CSS](#tailwind-css) | ||
- [D2](#d2) | ||
<!--toc:end--> | ||
|
||
| | JVM | Scala.js (1.x) | Scala Native (0.4.0) | | ||
| -------------- | --- | -------------- | --------------------- | | ||
| Scala 2.12.13 | ✅ | ✅ | ✅ | | ||
| Scala 2.13.5 | ✅ | ✅ | ✅ | | ||
| Scala 3.1.x | ✅ | ✅ | ✅ | | ||
|
||
### Tailwind CSS | ||
|
||
* Github Actions is used for CI and Releases | ||
https://tailwindcss.com/docs/installation | ||
|
||
* On pushes and pull requests, `sbt ci` command is ran (more about it later) | ||
* On tags, `sbt ci-release` command is ran, from [sbt-ci-release](https://github.com/olafurpg/sbt-ci-release) | ||
* Version is determined using [sbt-dynver](https://github.com/dwijnand/sbt-dynver) | ||
```scala mdoc | ||
import com.indoorvivants.yank._ | ||
|
||
* Syntax formatting is verified using [sbt-scalafmt](https://github.com/scalameta/sbt-scalafmt) | ||
val downloadedPath: java.nio.file.Path = | ||
Tool.bootstrap(new tools.TailwindCSS)(tools.TailwindCSS.Config(version = "3.2.7")) | ||
``` | ||
|
||
* Imports are organised and checked using [organize-imports](https://github.com/liancheng/scalafix-organize-imports) Scalafix rule | ||
### D2 | ||
|
||
* Several other Scalafix rules are enabled by default, see [.scalafix.conf](.scalafix.conf) | ||
https://d2lang.com/ | ||
|
||
* Compilation flags are set using [sbt-tpolecat](https://github.com/DavidGregory084/sbt-tpolecat) | ||
```scala mdoc:nest | ||
import com.indoorvivants.yank._ | ||
|
||
* Explicit dependencies are checked using [sbt-explicit-dependencies](https://github.com/cb372/sbt-explicit-dependencies) | ||
val downloadedPath: java.nio.file.Path = | ||
Tool.bootstrap(new tools.D2)(tools.D2.Config(version = "0.4.1")) | ||
``` | ||
|
||
* Presence of Licence header is checked using [sbt-header](https://github.com/sbt/sbt-header/) | ||
|
||
* Binary incompatibilities among dependencies are checked using [sbt-missinglink](https://github.com/scalacenter/sbt-missinglink) | ||
|
||
* Build matrix is managed using [sbt-projectmatrix](https://github.com/sbt/sbt-projectmatrix) | ||
|
||
### `sbt preCI` | ||
| | JVM | | ||
| -------------- | --- | | ||
| Scala 2.12 | ✅ | | ||
| Scala 2.13 | ✅ | | ||
| Scala 3 | ✅ | | ||
|
||
A `preCI` command is added - which will reformat, apply scalafix rules, create licence headers, run missinglink, etc. | ||
|
||
This command is designed to be run before pushing, **not on CI**. | ||
|
||
`sbt ci` command only runs checks, it never changes sources. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters