Skip to content

Commit dd21853

Browse files
committed
Migrate example-project to ReScript 12
1 parent fd23865 commit dd21853

21 files changed

+1811
-421
lines changed

analysis/examples/example-project/bsconfig.json

Lines changed: 0 additions & 14 deletions
This file was deleted.

analysis/examples/example-project/package-lock.json

Lines changed: 165 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
{
2+
"name": "tryit",
23
"dependencies": {
3-
"reason-react": "^0.9.1",
4-
"rescript": "^9.1.2"
4+
"@rescript/react": "^0.14.0",
5+
"rescript": "12.0.2"
56
},
67
"scripts": {
78
"build": "rescript",
89
"start": "rescript build -w",
9-
"clean": "rescript clean -with-deps"
10+
"clean": "rescript clean",
11+
"format": "rescript format"
1012
}
1113
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"name": "tryit",
3+
"sources": "src",
4+
"compiler-flags": [],
5+
"warnings": {
6+
"number": "-32-26-27-33"
7+
},
8+
"dependencies": ["@rescript/react"],
9+
"jsx": {
10+
"version": 4
11+
},
12+
"namespace": "my-namespace",
13+
"package-specs": {
14+
"module": "esmodule",
15+
"in-source": true,
16+
"suffix": ".res.js"
17+
}
18+
}

analysis/examples/example-project/src/B.re

Lines changed: 0 additions & 9 deletions
This file was deleted.

analysis/examples/example-project/src/Hello.res

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ let awesome =
5050

5151
let thing = "thing"
5252

53-
let transform = (x, y) => x ++ Js.Float.toString(y)
53+
let transform = (x, y) => x ++ Float.toString(y)
5454

5555
let z = transform("hello ", 5.)
5656

@@ -64,8 +64,6 @@ let added =
6464

6565
open Other
6666

67-
open Hashtbl
68-
6967
@ocaml.doc(" Some more documentation about this ")
7068
let awesome = x => x + 2
7169

@@ -93,14 +91,12 @@ let someFunction = (memorableName, {contents}) => {
9391

9492
let z = 10
9593

96-
let z = find
97-
9894
let z = later
9995

10096
let m = Other.later
10197

10298
for _index in 0 to 10 {
103-
print_endline("hellO")
99+
Console.log("hellO")
104100
}
105101

106102
module OneOneOneOne = {
@@ -170,4 +166,3 @@ type lockfile = {
170166
pastVersions: Belt.HashMap.Int.t<list<(shortReference, int)>>,
171167
current: list<(shortReference, int)>,
172168
}
173-

0 commit comments

Comments
 (0)