Skip to content

Commit 728398f

Browse files
fhammerschmidtcristianoc
authored andcommitted
Add example workspace-project
1 parent d9e03ed commit 728398f

File tree

16 files changed

+214
-0
lines changed

16 files changed

+214
-0
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
*.exe
2+
*.obj
3+
*.out
4+
*.compile
5+
*.native
6+
*.byte
7+
*.cmo
8+
*.annot
9+
*.cmi
10+
*.cmx
11+
*.cmt
12+
*.cmti
13+
*.cma
14+
*.a
15+
*.cmxa
16+
*.obj
17+
*~
18+
*.annot
19+
*.cmj
20+
*.bak
21+
lib
22+
*.mlast
23+
*.mliast
24+
.vscode
25+
.merlin
26+
.bsb.lock
27+
/node_modules/
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# ReScript workspaces example (monorepo)
2+
3+
```
4+
npm install
5+
npm run build
6+
npm run start
7+
```
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"name": "app",
3+
"bsc-flags": ["-open Common"],
4+
"bs-dependencies": ["common", "myplugin"],
5+
"sources": [
6+
{
7+
"dir": "src",
8+
"subdirs": true
9+
}
10+
]
11+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"name": "app",
3+
"version": "0.1.0"
4+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
let _ = Myplugin.Promise.resolve(Utils.printError("Oh no!"))
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"name": "workspace-project",
3+
"version": "0.1.0",
4+
"sources": [],
5+
"package-specs": {
6+
"module": "es6",
7+
"in-source": true
8+
},
9+
"suffix": ".mjs",
10+
"pinned-dependencies": ["common", "myplugin", "app"],
11+
"bs-dependencies": ["common", "myplugin", "app"]
12+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"name": "common",
3+
"namespace": true,
4+
"sources": [
5+
{
6+
"dir": "src",
7+
"subdirs": true
8+
}
9+
]
10+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"name": "common",
3+
"version": "0.1.0"
4+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// Generated by ReScript, PLEASE EDIT WITH CARE
2+
3+
4+
function printError(error) {
5+
var errorMessage = "\u001b[31m" + error;
6+
console.log(errorMessage);
7+
8+
}
9+
10+
export {
11+
printError ,
12+
13+
}
14+
/* No side effect */
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
let printError = error => {
2+
let errorMessage = `\u001b[31m${error}`
3+
Js.log(errorMessage)
4+
}

0 commit comments

Comments
 (0)