File tree Expand file tree Collapse file tree 6 files changed +66
-20
lines changed Expand file tree Collapse file tree 6 files changed +66
-20
lines changed Original file line number Diff line number Diff line change @@ -19,3 +19,5 @@ test/bundle/*.js
19
19
test /bundle /* .js.gz
20
20
promise- *
21
21
_release
22
+
23
+ * .mjs
Original file line number Diff line number Diff line change 1
- # rescript-bindings-template
1
+ # rescript-< module >
2
2
3
- NOTE: For versioning & auto npm deploy, add a ` NPM_TOKEN ` to the repository secrets.
3
+ ReScript bindings for [ < module > ] ( https://github.com/X/Y ) (targeted version : ` ~X.X.X ` )
4
4
5
5
## Setup
6
6
7
7
1 . Install the module
8
8
9
9
``` bash
10
- bun install @dck/rescript-x
10
+ bun install @dck/rescript-< module>
11
+ # or
12
+ yarn install @dck/rescript-< module>
13
+ # or
14
+ npm install @dck/rescript-< module>
11
15
```
12
16
13
- or
17
+ 2 . Add it to your ` rescript.json ` config
14
18
15
- ``` bash
16
- yarn install @dck/rescript-x
19
+ ``` json
20
+ {
21
+ "bsc-dependencies" : [" @dck/rescript-<module>" ]
22
+ }
17
23
```
18
24
19
- or
25
+ ## Usage
26
+
27
+ The functions can be accessed through ` X ` module.
28
+
29
+ ## Development
30
+
31
+ Install deps
20
32
21
33
``` bash
22
- npm install @dck/rescript-x
34
+ bun install
23
35
```
24
36
25
- 2 . Add it to your ` rescript.json ` config
37
+ Compiles files
26
38
27
- ``` json
28
- {
29
- "bsc-flags" : [" @dck/rescript-x" ]
30
- }
39
+ ``` bash
40
+ bun run dev
31
41
```
32
42
33
- ## API
43
+ Run tests
44
+
45
+ ``` bash
46
+ bun test
47
+ ```
Original file line number Diff line number Diff line change 1
1
{
2
- "name" : " @dck/rescript-bindings-template " ,
2
+ "name" : " @dck/rescript-<module> " ,
3
3
"version" : " 0.0.0" ,
4
- "description" : " " ,
4
+ "description" : " ReScript bindings for <module> " ,
5
5
"keywords" : [
6
6
" rescript" ,
7
7
" bindings"
16
16
"rescript" : " >=11.0.0"
17
17
},
18
18
"devDependencies" : {
19
- "rescript" : " >=11.0.0"
19
+ "@rescript/core" : " ^1.0.0" ,
20
+ "rescript" : " >=11.0.0" ,
21
+ "rescript-bun" : " ^0.4.1"
20
22
},
21
23
"scripts" : {
22
24
"build" : " rescript build" ,
23
- "watch " : " rescript build -w" ,
25
+ "dev " : " rescript build -w" ,
24
26
"clean" : " rescript clean"
25
27
},
26
28
"files" : [
27
29
" src/*" ,
28
30
" rescript.json"
29
- ]
31
+ ],
32
+ "engines" : {
33
+ "node" : " >=18"
34
+ }
30
35
}
Original file line number Diff line number Diff line change 1
1
{
2
- "name" : " @dck/rescript-bindings-template " ,
2
+ "name" : " @dck/rescript-<module> " ,
3
3
"uncurried" : true ,
4
4
"namespace" : false ,
5
5
"sources" : [
6
6
{
7
7
"dir" : " src" ,
8
8
"subdirs" : true
9
+ },
10
+ {
11
+ "dir" : " tests" ,
12
+ "type" : " dev" ,
13
+ "subdirs" : true
14
+ }
15
+ ],
16
+ "suffix" : " .mjs" ,
17
+ "bs-dev-dependencies" : [" @rescript/core" , " rescript-bun" ],
18
+ "package-specs" : [
19
+ {
20
+ "module" : " es6" ,
21
+ "in-source" : true
9
22
}
10
23
]
11
24
}
Original file line number Diff line number Diff line change
1
+ open RescriptCore
2
+ open RescriptBun
3
+ open RescriptBun .Globals
4
+ open Test
5
+
6
+ let wait = ms => {
7
+ Promise .make ((resolve , _ ) => setTimeout (() => resolve (), ms )-> ignore )
8
+ }
9
+
10
+ test ("demo" , () => {
11
+ expect (1 )-> Expect .toBe (1 )
12
+ })
You can’t perform that action at this time.
0 commit comments