File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ echo Formatting OCaml code...
66dune build @fmt --auto-promote
77
88echo Formatting ReScript code...
9- files=$( find runtime tests -type f \( -name " *.res" -o -name " *.resi" \) ! -name " syntaxErrors*" ! -name " generated_mocha_test.res" ! -path " tests/syntax_tests*" ! -path " tests/analysis_tests/tests*" ! -path " */node_modules/*" )
9+ files=$( find runtime tests scripts/res -type f \( -name " *.res" -o -name " *.resi" \) ! -name " syntaxErrors*" ! -name " generated_mocha_test.res" ! -path " tests/syntax_tests*" ! -path " tests/analysis_tests/tests*" ! -path " */node_modules/*" )
1010./cli/rescript.js format $files
1111
1212echo Formatting JS code...
Original file line number Diff line number Diff line change @@ -12,8 +12,8 @@ module Docgen = RescriptTools.Docgen
1212
1313let packagePath = Path .join ([Node .dirname , ".." , ".." , "package.json" ])
1414let version = switch Fs .readFileSync (packagePath , ~encoding = "utf8" )-> JSON .parseOrThrow {
15- | Object (dict {"version" : JSON .String (version )}) => version
16- | _ => JsError .panic ("Invalid package.json format" )
15+ | Object (dict {"version" : JSON .String (version )}) => version
16+ | _ => JsError .panic ("Invalid package.json format" )
1717}
1818let version = Semver .parse (version )-> Option .getOrThrow
1919let version = Semver .toString ({... version , preRelease : None }) // Remove pre-release identifiers for API docs
@@ -22,7 +22,6 @@ if !Fs.existsSync(dirVersion) {
2222 Fs .mkdirSync (dirVersion )
2323}
2424
25-
2625let entryPointFiles = ["Belt.res" , "Dom.res" , "Js.res" , "Stdlib.res" ]
2726
2827let hiddenModules = ["Js.Internal" , "Js.MapperRt" ]
@@ -56,9 +55,10 @@ let docsDecoded = entryPointFiles->Array.map(libFile =>
5655 },
5756 )-> Buffer .toString
5857
59- let docs = output
60- -> JSON .parseOrThrow
61- -> Docgen .decodeFromJson
58+ let docs =
59+ output
60+ -> JSON .parseOrThrow
61+ -> Docgen .decodeFromJson
6262 Console .log (` Generated docs from ${libFile}` )
6363 docs
6464 } catch {
You can’t perform that action at this time.
0 commit comments