Commit 50fcf87
Add page documenting the compiler config (#4985)
Summary:
Our compiler config is relatively huge and small details of it change frequently. Keeping it documented and up to date has proved too difficult. However, recently we started driving a JSON schema representation of it and shipping that as part of the VSCode extension to give in-editor feedback about what options exist and to catch errors.
However there still has not been an exhaustive place to see what options exist or read about them.
This PR attempts to solve that by adding a new documentation page with a hand-written React renderer that traverses the JSON schema and renders a friendly version of it that looks ~like TypeScript types, which should be familiar to our users.
Some problems to solve if we want to go this way:
- [x] How should we sync the config schema file to the website folder?
- [x] How should we automate testing that schema changes do not break this?
- I've confirmed that Docusaurus build will fail if we throw in the React components. So, if we are okay with that being our "test" that we can correctly render our config docs, we can just ensure that our react components are defensive and throw on any unhandled cases.
- [x] Interlink (and remove duplication) with existing compiler page
- [x] See if we can fix anchor links (it scrolls such that the anchor ends up under the header)
- [x] Handle dark mode

Pull Request resolved: #4985
Reviewed By: evanyeung
Differential Revision: D74346512
Pulled By: captbaritone
fbshipit-source-id: e4443df73bbe01631c7c7b7ec915f81d541d0fc51 parent 642f964 commit 50fcf87Copy full SHA for 50fcf87
9 files changed
+530-7Lines changed: 530 additions & 7 deletions
File tree
Expand file treeCollapse file tree
Open diff view settings
Filter options
- website
- docs
- api-reference/relay-runtime
- getting-started
- glossary
- plugins
- src
- compiler-config
- css
Expand file treeCollapse file tree
Open diff view settings
Collapse file
website/docs/api-reference/relay-runtime/runtime-configuration.md
Copy file name to clipboardExpand all lines: website/docs/api-reference/relay-runtime/runtime-configuration.md+1-1Lines changed: 1 addition & 1 deletion
- Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
13 | 13 | |
14 | 14 | |
15 | 15 | |
16 | | - |
| 16 | + |
17 | 17 | |
18 | 18 | |
19 | 19 | |
|
Collapse file
website/docs/getting-started/compiler-config.md
Copy file name to clipboard+24Lines changed: 24 additions & 0 deletions
- Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
| 1 | + |
| 2 | + |
| 3 | + |
| 4 | + |
| 5 | + |
| 6 | + |
| 7 | + |
| 8 | + |
| 9 | + |
| 10 | + |
| 11 | + |
| 12 | + |
| 13 | + |
| 14 | + |
| 15 | + |
| 16 | + |
| 17 | + |
| 18 | + |
| 19 | + |
| 20 | + |
| 21 | + |
| 22 | + |
| 23 | + |
| 24 | + |
Collapse file
website/docs/getting-started/compiler.md
Copy file name to clipboardExpand all lines: website/docs/getting-started/compiler.md+4-3Lines changed: 4 additions & 3 deletions
- Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
21 | 21 | |
22 | 22 | |
23 | 23 | |
24 | | - |
| 24 | + |
25 | 25 | |
26 | 26 | |
27 | 27 | |
| ||
31 | 31 | |
32 | 32 | |
33 | 33 | |
34 | | - |
35 | | - |
36 | 34 | |
37 | 35 | |
38 | 36 | |
39 | 37 | |
| 38 | + |
| 39 | + |
| 40 | + |
40 | 41 | |
41 | 42 | |
42 | 43 | |
|
Collapse file
website/docs/glossary/glossary.md
Copy file name to clipboardExpand all lines: website/docs/glossary/glossary.md+3-3Lines changed: 3 additions & 3 deletions
- Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
63 | 63 | |
64 | 64 | |
65 | 65 | |
66 | | - |
| 66 | + |
67 | 67 | |
68 | 68 | |
69 | 69 | |
| ||
91 | 91 | |
92 | 92 | |
93 | 93 | |
94 | | - |
| 94 | + |
95 | 95 | |
96 | 96 | |
97 | 97 | |
| ||
135 | 135 | |
136 | 136 | |
137 | 137 | |
138 | | - |
| 138 | + |
139 | 139 | |
140 | 140 | |
141 | 141 | |
|
Collapse file
website/docusaurus.config.js
Copy file name to clipboardExpand all lines: website/docusaurus.config.js+2Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
245 | 245 | |
246 | 246 | |
247 | 247 | |
| 248 | + |
248 | 249 | |
249 | 250 | |
250 | 251 | |
| ||
257 | 258 | |
258 | 259 | |
259 | 260 | |
| 261 | + |
260 | 262 | |
261 | 263 | |
262 | 264 | |
|
Collapse file
website/plugins/webpack-alias.js
Copy file name to clipboard+50Lines changed: 50 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
| 1 | + |
| 2 | + |
| 3 | + |
| 4 | + |
| 5 | + |
| 6 | + |
| 7 | + |
| 8 | + |
| 9 | + |
| 10 | + |
| 11 | + |
| 12 | + |
| 13 | + |
| 14 | + |
| 15 | + |
| 16 | + |
| 17 | + |
| 18 | + |
| 19 | + |
| 20 | + |
| 21 | + |
| 22 | + |
| 23 | + |
| 24 | + |
| 25 | + |
| 26 | + |
| 27 | + |
| 28 | + |
| 29 | + |
| 30 | + |
| 31 | + |
| 32 | + |
| 33 | + |
| 34 | + |
| 35 | + |
| 36 | + |
| 37 | + |
| 38 | + |
| 39 | + |
| 40 | + |
| 41 | + |
| 42 | + |
| 43 | + |
| 44 | + |
| 45 | + |
| 46 | + |
| 47 | + |
| 48 | + |
| 49 | + |
| 50 | + |
Collapse file
+1Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
158 | 158 | |
159 | 159 | |
160 | 160 | |
| 161 | + |
161 | 162 | |
162 | 163 | |
163 | 164 | |
|
0 commit comments