Skip to content

Commit 7acedb3

Browse files
committed
Add pnpm monorepo sample
1 parent 7ca24e9 commit 7acedb3

File tree

13 files changed

+214
-0
lines changed

13 files changed

+214
-0
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"rescript.settings.incrementalTypechecking.debugLogging": true
3+
}

repos/pnpm/monorepo/package.json

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"name": "monorepo",
3+
"version": "1.0.0",
4+
"private": true,
5+
"description": "",
6+
"main": "index.js",
7+
"scripts": {
8+
"test": "echo \"Error: no test specified\" && exit 1"
9+
},
10+
"keywords": [],
11+
"author": "",
12+
"license": "ISC",
13+
"packageManager": "pnpm@10.15.1",
14+
"dependencies": {
15+
"rescript": "catalog:",
16+
"a": "workspace:*",
17+
"b": "workspace:*"
18+
}
19+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"name": "a",
3+
"version": "1.0.0",
4+
"private": false,
5+
"type": "module",
6+
"main": "index.js",
7+
"exports": "./index.js",
8+
"scripts": {
9+
"build": "echo \"no build\"",
10+
"start": "node index.js"
11+
},
12+
"dependencies": {
13+
"rescript": "catalog:"
14+
},
15+
"license": "ISC"
16+
}
17+
18+
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"name": "a",
3+
"sources": ["src"]
4+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
let a = 1
2+
let x : string = "e"
3+
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// Generated by ReScript, PLEASE EDIT WITH CARE
2+
3+
4+
let a = 1;
5+
6+
export {
7+
a,
8+
}
9+
/* No side effect */
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"name": "b",
3+
"version": "1.0.0",
4+
"private": false,
5+
"type": "module",
6+
"main": "index.js",
7+
"exports": "./index.js",
8+
"scripts": {
9+
"build": "echo \"no build\"",
10+
"start": "node index.js"
11+
},
12+
"dependencies": {
13+
"rescript": "catalog:",
14+
"a": "workspace:^1.0.0"
15+
},
16+
"license": "ISC"
17+
}
18+
19+
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"name": "b",
3+
"sources": ["src"],
4+
"dependencies": ["a"]
5+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Console.log(A.a + 2)
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// Generated by ReScript, PLEASE EDIT WITH CARE
2+
3+
import * as A from "a/src/A.res.mjs";
4+
5+
console.log(A.a + 2 | 0);
6+
7+
/* Not a pure module */

0 commit comments

Comments
 (0)