You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Be sure to run `scalafmt` (available in the root folder) to ensure code formatting.
49
-
`./scalafmt --diff` formats only the files that have changed from the master branch.
50
-
You can read more about it at http://scalafmt.org
47
+
Be sure to run `scalafmt` (available in the root folder) to ensure code
48
+
formatting. `./scalafmt --diff` formats only the files that have changed from
49
+
the master branch. You can read more about it at http://scalafmt.org
51
50
52
51
## Documentation
53
52
54
-
The scalafix documentation website uses [sbt-microsite](https://47deg.github.io/sbt-microsites/).
53
+
The scalafix documentation website uses [Docusaurus](https://docusaurus.io/) and
54
+
[mdoc](https://github.com/olafurpg/mdoc).
55
55
56
-
You'll need Jekyll to build the website. You can follow the installation instructions
57
-
[here](https://jekyllrb.com/docs/installation/).
56
+
First, make sure you have the [yarn](https://yarnpkg.com/en/) package manager
57
+
installed installed.
58
58
59
-
Once you have Jekyll, build the website with:
59
+
Next, start sbt and compile the markdown documentation. The documentation will
60
+
re-generate on file save.
60
61
61
62
```sh
62
-
sbt website/makeMicrosite
63
+
$ sbt
64
+
> docs/run -w
63
65
```
64
66
65
-
To view the website in your browser:
67
+
To view the website in your browser, start the Docusaurus live reload server
66
68
67
69
```sh
68
-
cd website/target/site
69
-
jekyll serve
70
-
open http://localhost:4000/scalafix/
70
+
cd website
71
+
yarn install
72
+
yarn start
71
73
```
72
74
73
-
All documentation is written in markdown, using [Liquid templates](https://jekyllrb.com/docs/templates/).
74
-
75
-
### Side menu
76
-
If you add/remove/move a docs (sub)section, you may want to edit the side menu. You'll find it [here](https://github.com/gabro/scalafix/blob/microsite/website/src/main/resources/microsite/data/menu.yml).
77
-
78
-
### Custom tags
79
-
We also have a few custom Liquid tags that you can use.
80
-
81
-
If you need to link to a page in the docs, you can use the `doc_ref` tag, for example:
82
-
83
-
```c
84
-
{% doc_ref Before your begin %}
85
-
// Expands to: /scalafix/docs/creating-your-own-rule/before-you-begin.html
86
-
```
87
-
88
-
You can also link to a specific section of the page:
89
-
90
-
```c
91
-
{% doc_ref Before your begin, What diff do you want to make %}
92
-
// Expands to: /scalafix/docs/creating-your-own-rule/before-you-begin.html#what-diff-you-want-to-make
93
-
```
94
-
95
-
If you need to link to a vocabulary term you can use the `glossary_ref` tag, for example:
96
-
97
-
```md
98
-
{% glossary_ref Patch %}
99
-
// Expands to: /scalafix/docs/creating-your-own-rule/vocabulary.html#patch
100
-
```
101
-
102
-
If you need to link to a page in the apidocs you can use the `apidocs_ref` tag, for example:
103
-
104
-
```md
105
-
{% apidocs_ref scalafix.patch.PatchOps %}
106
-
// Expands to: /scalafix/docs/api/scalafix/patch/PatchOps.scala
107
-
```
75
+
Consult the Docusaurus website for instructions on how to customize the sidebar
76
+
or tweak the landing page.
108
77
109
78
## Binary Compatibility
110
79
111
-
To avoid breaking binary compatiblity we use the Migration Manage for Scala or [Mima](https://github.com/lightbend/migration-manager) for short.
80
+
To avoid breaking binary compatiblity we use the Migration Manage for Scala or
81
+
[Mima](https://github.com/lightbend/migration-manager) for short.
112
82
113
-
Anything under the package `scalafix.internal._` does not have compatibility restrictions.
83
+
Anything under the package `scalafix.internal._` does not have compatibility
84
+
restrictions.
114
85
115
86
Run `sbt mimaReportBinaryIssues` to check for any compatibility issues.
116
87
117
88
## Publish setup
118
89
119
-
Scalafix is setup to publish automatically when we publish a tag on GitHub. You should not have to worry
120
-
about this part. For completeness, this is how it was set up:
90
+
Scalafix is setup to publish automatically when we publish a tag on GitHub. You
91
+
should not have to worry about this part. For completeness, this is how it was
0 commit comments