File tree Expand file tree Collapse file tree 2 files changed +7
-8
lines changed
Expand file tree Collapse file tree 2 files changed +7
-8
lines changed Original file line number Diff line number Diff line change 1414 "res:watch" : " rescript watch" ,
1515 "res:clean" : " rescript clean" ,
1616 "res:build" : " rescript build" ,
17- "build" : " rescript build && react-router build" ,
17+ "build" : " patch-package && rescript build && react-router build" ,
1818 "test" : " node scripts/test-examples.mjs && node scripts/test-hrefs.mjs" ,
1919 "reanalyze" : " reanalyze -all-cmt ." ,
2020 "update-index" : " npm run generate-llms && && node scripts/generate_feed.mjs > public/blog/feed.xml" ,
Original file line number Diff line number Diff line change @@ -129,13 +129,12 @@ let remarkReScriptPrelude = tree => {
129129let remarkLinkPlugin = (tree , vfile ) => {
130130 visit (tree , "link" , node => {
131131 let url = node ["url" ]
132- let filePath = switch vfile ["history" ][0 ] {
133- | Some (path ) => path
134- | None => {
135- Console .error2 ("File path not found for vfile:" , JSON .stringifyAny (node ["url" ]))
136- ""
137- }
138- }
132+ let filePath =
133+ vfile ["history" ][0 ]-> Option .getOrThrow (
134+ ~message = ` File path not found for vfile: ${JSON.stringifyAny(vfile)-> Option.getOr(
135+ "unknown vfile" ,
136+ )}` ,
137+ )
139138
140139 // Direct links to the homepage are OK
141140 if url == "https://rescript-lang.org" {
You can’t perform that action at this time.
0 commit comments