File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -11,6 +11,17 @@ let stdlibPaths = {
1111 -> Array .filter (path => path !== "docs/manual/api/stdlib" )
1212}
1313
14+ let domPaths = {
15+ let rawFile = await Node .Fs .readFile ("./markdown-pages/docs/api/dom.json" , "utf-8" )
16+ let json = JSON .parseOrThrow (rawFile )
17+ switch json {
18+ | Object (json ) => Dict .keysToArray (json )
19+ | _ => []
20+ }
21+ -> Array .map (key => "docs/manual/api/" ++ key )
22+ -> Array .filter (path => path !== "docs/manual/api/dom" )
23+ }
24+
1425let beltPaths = {
1526 let rawFile = await Node .Fs .readFile ("./markdown-pages/docs/api/belt.json" , "utf-8" )
1627 let json = JSON .parseOrThrow (rawFile )
@@ -25,6 +36,9 @@ let beltPaths = {
2536let stdlibRoutes =
2637 stdlibPaths -> Array .map (path => route (path , "./routes/ApiRoute.jsx" , ~options = {id : path }))
2738
39+ let domRoutes =
40+ domPaths -> Array .map (path => route (path , "./routes/ApiRoute.jsx" , ~options = {id : path }))
41+
2842let beltRoutes =
2943 beltPaths -> Array .map (path => route (path , "./routes/ApiRoute.jsx" , ~options = {id : path }))
3044
@@ -72,6 +86,7 @@ let default = [
7286 route ("docs/manual/api/dom" , "./routes/ApiRoute.jsx" , ~options = {id : "api-dom" }),
7387 ... stdlibRoutes ,
7488 ... beltRoutes ,
89+ ... domRoutes ,
7590 ... blogArticleRoutes ,
7691 ... docsGuidelinesRoutes ,
7792 ... communityRoutes ,
You can’t perform that action at this time.
0 commit comments