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...
6
6
dune build @fmt --auto-promote
7
7
8
8
echo 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/*" )
10
10
./cli/rescript.js format $files
11
11
12
12
echo Formatting JS code...
Original file line number Diff line number Diff line change @@ -12,8 +12,8 @@ module Docgen = RescriptTools.Docgen
12
12
13
13
let packagePath = Path .join ([Node .dirname , ".." , ".." , "package.json" ])
14
14
let 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" )
17
17
}
18
18
let version = Semver .parse (version )-> Option .getOrThrow
19
19
let version = Semver .toString ({... version , preRelease : None }) // Remove pre-release identifiers for API docs
@@ -22,7 +22,6 @@ if !Fs.existsSync(dirVersion) {
22
22
Fs .mkdirSync (dirVersion )
23
23
}
24
24
25
-
26
25
let entryPointFiles = ["Belt.res" , "Dom.res" , "Js.res" , "Stdlib.res" ]
27
26
28
27
let hiddenModules = ["Js.Internal" , "Js.MapperRt" ]
@@ -56,9 +55,10 @@ let docsDecoded = entryPointFiles->Array.map(libFile =>
56
55
},
57
56
)-> Buffer .toString
58
57
59
- let docs = output
60
- -> JSON .parseOrThrow
61
- -> Docgen .decodeFromJson
58
+ let docs =
59
+ output
60
+ -> JSON .parseOrThrow
61
+ -> Docgen .decodeFromJson
62
62
Console .log (` Generated docs from ${libFile}` )
63
63
docs
64
64
} catch {
You can’t perform that action at this time.
0 commit comments