on master help sign in
Updated visual style of elm.json docs
2861e0eEvan Czaplicki
docs/elm.json/application.md+11−1
@@ -25,27 +25,37 @@ This is a decent baseline for pretty much any applications made with Elm. You wi
25}
25}
26```
26```
27
27
28+<br>
29+
28
30
29## `"type"`
31## `"type"`
30
32
31Either `"application"` or `"package"`. All the other fields are based on this choice!
33Either `"application"` or `"package"`. All the other fields are based on this choice!
32
34
35+<br>
36+
33
37
34## `"source-directories"`
38## `"source-directories"`
35
39
36A list of directories where Elm code lives. Most projects just use `"src"` for everything.
40A list of directories where Elm code lives. Most projects just use `"src"` for everything.
37
41
42+<br>
43+
38
44
39## `"elm-version"`
45## `"elm-version"`
40
46
41The exact version of Elm this builds with. Should be `"0.19.0"` for most people!
47The exact version of Elm this builds with. Should be `"0.19.0"` for most people!
42
48
49+<br>
50+
43
51
44## `"dependencies"`
52## `"dependencies"`
45
53
46All the packages you depend upon. We use exact versions, so your `elm.json` file doubles as a "lock file" that ensures reliable builds.
54All the packages you depend upon. We use exact versions, so your `elm.json` file doubles as a "lock file" that ensures reliable builds.
47
55
48−> **Note:** We plan to eventually have a screen in `reactor` that helps add, remove, and upgrade packages. It can sometimes be tricky to keep all of the constraints happy, so we think having a UI will help a lot. If you get into trouble in the meantime, adding things back one-by-one often helps, and I hope you do not get into trouble!
56+**Note:** We plan to eventually have a screen in `reactor` that helps add, remove, and upgrade packages. It can sometimes be tricky to keep all of the constraints happy, so we think having a UI will help a lot. If you get into trouble in the meantime, adding things back one-by-one often helps, and I hope you do not get into trouble!
57+
58+<br>
49
59
50
60
51## `"test-dependencies"`
61## `"test-dependencies"`
docs/elm.json/package.md+18−1
@@ -21,12 +21,15 @@ This is roughly `elm.json` for the `elm-lang/json` package:
21}
21}
22```
22```
23
23
24+<br>
24
25
25
26
26## `"type"`
27## `"type"`
27
28
28Either `"application"` or `"package"`. All the other fields are based on this choice.
29Either `"application"` or `"package"`. All the other fields are based on this choice.
29
30
31+<br>
32+
30
33
31## `"name"`
34## `"name"`
32
35
@@ -34,16 +37,22 @@ The name of a GitHub repo like `"elm-lang/core"` or `"rtfeldman/elm-css"`.
34
37
35> **Note:** We currently only support GitHub repos to ensure that there are no author name collisions. This seems like a pretty tricky problem to solve in a pleasant way For example, do we have to keep an author name registry and give them out as we see them? But if someone is the same person on two platforms? And how to make this all happen in a way this is really nice for typical Elm users? Etc. So adding other hosting endpoints is harder than it sounds.
38> **Note:** We currently only support GitHub repos to ensure that there are no author name collisions. This seems like a pretty tricky problem to solve in a pleasant way For example, do we have to keep an author name registry and give them out as we see them? But if someone is the same person on two platforms? And how to make this all happen in a way this is really nice for typical Elm users? Etc. So adding other hosting endpoints is harder than it sounds.
36
39
40+<br>
41+
37
42
38## `"summary"`
43## `"summary"`
39
44
40A short summary that will appear on [`package.elm-lang.org`](https://package.elm-lang.org/) that describes what the package is for. Must be under 80 characters.
45A short summary that will appear on [`package.elm-lang.org`](https://package.elm-lang.org/) that describes what the package is for. Must be under 80 characters.
41
46
47+<br>
48+
42
49
43## `"license"`
50## `"license"`
44
51
45An OSI approved SPDX code like `"BSD-3-Clause"` or `"MIT"`. These are the two most common licenses in the Elm ecosystem, but you can see the full list of options [here](https://spdx.org/licenses/).
52An OSI approved SPDX code like `"BSD-3-Clause"` or `"MIT"`. These are the two most common licenses in the Elm ecosystem, but you can see the full list of options [here](https://spdx.org/licenses/).
46
53
54+<br>
55+
47
56
48## `"version"`
57## `"version"`
49
58
@@ -51,18 +60,24 @@ All packages start at `"1.0.0"` and from there, Elm automatically enforces seman
51
60
52So if you make a PATCH change and call `elm bump` it will update you to `"1.0.1"`. And if you then decide to remove a function (a MAJOR change) and call `elm bump` it will update you to `"2.0.0"`. Etc.
61So if you make a PATCH change and call `elm bump` it will update you to `"1.0.1"`. And if you then decide to remove a function (a MAJOR change) and call `elm bump` it will update you to `"2.0.0"`. Etc.
53
62
63+<br>
64+
54
65
55## `"exposed-modules"`
66## `"exposed-modules"`
56
67
57A list of modules that will be exposed to people using your package. The order you list them will be the order they appear on [`package.elm-lang.org`](https://package.elm-lang.org/).
68A list of modules that will be exposed to people using your package. The order you list them will be the order they appear on [`package.elm-lang.org`](https://package.elm-lang.org/).
58
69
59−> **Note:** If you have five or more modules, you can use a labelled list like [this](https://github.com/elm-lang/core/blob/master/elm.json). We show the labels on the package website to help people sort through larger packages with distinct categories. Labels must be under 20 characters.
70+**Note:** If you have five or more modules, you can use a labelled list like [this](https://github.com/elm-lang/core/blob/master/elm.json). We show the labels on the package website to help people sort through larger packages with distinct categories. Labels must be under 20 characters.
71+
72+<br>
60
73
61
74
62## `"elm-version"`
75## `"elm-version"`
63
76
64The range of Elm compilers that work with your package. Right now `"0.19.0 <= v < 0.20.0"` is always what you want for this.
77The range of Elm compilers that work with your package. Right now `"0.19.0 <= v < 0.20.0"` is always what you want for this.
65
78
79+<br>
80+
66
81
67## `"dependencies"`
82## `"dependencies"`
68
83
@@ -70,6 +85,8 @@ A list of packages that you depend upon. In each application, there can only be
70
85
71> **Note:** Dependency ranges should only express _tested_ ranges. It is not nice to use optimistic ranges and end up causing build failures for your users down the line. Eventually we would like to have an automated system that tries to build and test packages as new packages come out. If it all works, we could send a PR to the author widening the range.
86> **Note:** Dependency ranges should only express _tested_ ranges. It is not nice to use optimistic ranges and end up causing build failures for your users down the line. Eventually we would like to have an automated system that tries to build and test packages as new packages come out. If it all works, we could send a PR to the author widening the range.
72
87
88+<br>
89+
73
90
74## `"test-dependencies"`
91## `"test-dependencies"`
75
92