File tree Expand file tree Collapse file tree 2 files changed +11
-16
lines changed
Expand file tree Collapse file tree 2 files changed +11
-16
lines changed Original file line number Diff line number Diff line change 2929 " @dusty-phillips/rescript-zora" ,
3030 " @ryyppy/rescript-promise"
3131 ],
32- "ppx-flags" : [],
33- "bsc-flags" : []
34- }
32+ "warnings" : {
33+ "number" : " A-4-40-41-42-43-44+101-102-103" ,
34+ "error" : " false"
35+ }
36+ }
Original file line number Diff line number Diff line change 1- /*
2- Normally `open NodeJs` would be used to shorten the module accessors
3- this is not done in the example to make it clear where things come from.
1+ open NodeJs
2+ let data = "Sample text to write to a file!" -> Buffer . fromString
3+ let process = Process . process
44
5- Note this means compiling the codebase from clean will trigger an error
6- just rebuild and it'll be fine.
7- */
5+ let outputPath = Path .relative (~from = Process .cwd (process ), ~to_ = "example__output.txt" )
86
9- let data = "Sample text to write to a file!" -> NodeJs .Buffer .fromString
10- let process = NodeJs .Process .process
11-
12- let outputPath = NodeJs .Path .relative (~from = NodeJs .Process .cwd (process ), ~to_ = "example__output.txt" )
13-
14- let writeStream = NodeJs .Fs .createWriteStream (outputPath )
7+ let writeStream = Fs .createWriteStream (outputPath )
158
169let logErrorIfExists = maybeError =>
1710 switch Js .Nullable .toOption (maybeError ) {
@@ -21,7 +14,7 @@ let logErrorIfExists = maybeError =>
2114
2215let () =
2316 writeStream
24- -> NodeJs . Stream .writeWith (
17+ -> Stream .writeWith (
2518 data ,
2619 ~callback = maybeError => {
2720 logErrorIfExists (maybeError )
You can’t perform that action at this time.
0 commit comments