Skip to content

Commit 1b6e2c3

Browse files
committed
Example no longer compiles cleanly; add note and workaround (compile twice).
1 parent c1eb0b0 commit 1b6e2c3

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

examples/StreamTextToFile.res

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
1-
// Normally `open NodeJs` would be used to shorten the module accessors
2-
// this is not done in the example to make it clear where things come from
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.
4+
5+
Note this means compiling the codebase from clean will trigger an error
6+
just rebuild and it'll be fine.
7+
*/
38

49
let data = "Sample text to write to a file!"->NodeJs.Buffer.fromString
510
let process = NodeJs.Process.process

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "rescript-nodejs",
33
"version": "14.0.4",
44
"scripts": {
5-
"build": "rescript",
5+
"build": "rescript || rescript",
66
"clean": "rescript clean",
77
"start": "rescript build -w",
88
"test": "rescript && pta 'lib/js/test/atomic/*.test.bs.js'",

0 commit comments

Comments
 (0)