Skip to content

Commit 3cafd29

Browse files
committed
Rearrange module pages
1 parent 2fbd578 commit 3cafd29

File tree

1 file changed

+21
-16
lines changed

1 file changed

+21
-16
lines changed

docs/src/docgen-md.own

Lines changed: 21 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use std, types, files, yaml, functional
1+
use std, types, files, json, yaml, functional
22

33
INPUT_PATH_FMT = "./modules/%s.yml"
44
OUTPUT_DIR_FMT = "../docs/%s/modules"
@@ -7,33 +7,39 @@ OUTPUT_PATH_FMT = OUTPUT_DIR_FMT + "/%s.md"
77
LANGS = ["en", "ru"]
88
MODULES = [
99
"std",
10-
"types",
11-
"math",
1210
"date",
11+
"downloader",
1312
"files",
13+
"functional",
1414
"http",
15+
"java",
16+
"math",
17+
"ounit",
18+
"regex",
19+
"robot",
1520
"socket",
16-
"downloader",
21+
"types",
22+
// formats
1723
"base64",
1824
"json",
1925
"yaml",
20-
"zip",
2126
"gzip",
22-
"functional",
23-
"robot",
24-
"ounit",
27+
"zip"
28+
29+
// Desktop-only
2530
"canvas",
2631
"canvasfx",
2732
"forms",
28-
"java",
29-
"jdbc",
30-
"regex",
33+
"jdbc"
34+
35+
// Android-only
3136
"android",
3237
"canvas_android",
3338
"forms_android",
34-
"imageprocessing_android",
35-
"gps_android"
39+
"gps_android",
40+
"imageprocessing_android"
3641
]
42+
3743
messages = {
3844
"constants": {"en": "Constants", "ru": "Константы"},
3945
"functions": {"en": "Functions", "ru": "Функции"},
@@ -43,10 +49,9 @@ messages = {
4349
}
4450

4551
// Write modules pages to vuepress config
52+
modulesPages = jsonencode(map(MODULES, def(m) = m + ".md"))
4653
f = fopen("../docs/.vuepress/configs/modules.js", "w")
47-
writeLine(f, "export default [")
48-
writeLine(f, stream(MODULES).map(def(m) = " \"%s.md\"".sprintf(m)).joining(",\n"))
49-
writeLine(f, "]")
54+
writeLine(f, "export default " + modulesPages)
5055
flush(f)
5156
fclose(f)
5257

0 commit comments

Comments
 (0)