Skip to content

Commit 539bf09

Browse files
authored
Merge pull request rescript-lang#1711 from chenglou/basic-reason
Basic Reason bsb template
2 parents 7d3ab64 + 398830a commit 539bf09

File tree

6 files changed

+110
-0
lines changed

6 files changed

+110
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
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/bs
22+
*.mlast
23+
*.mliast
24+
.vscode
25+
.merlin
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Basic Reason Template
2+
3+
Hello! This project allows you to quickly get started with Reason and BuckleScript. If you wanted a more sophisticated version, try the `react` template (`bsb -theme react -init .`).
4+
5+
# Build
6+
```
7+
npm run build
8+
```
9+
10+
# Build + Watch
11+
12+
```
13+
npm run watch
14+
```
15+
16+
17+
# Editor
18+
If you use `vscode`, Press `Windows + Shift + B` it will build automatically
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// This is the configuration file used by BuckleScript's build system bsb. Its documentation lives here: http://bloomberg.github.io/bucklescript/docson/#build-schema.json
2+
// BuckleScript comes with its own parser for bsconfig.json, which is normal JSON, with the extra support of comments and trailing commas.
3+
{
4+
"name": "${bsb:name}",
5+
"version": "${bsb:proj-version}",
6+
"sources": [
7+
"src"
8+
],
9+
"bs-dependencies" : [
10+
// add your dependencies here. You'd usually install them normally through `npm install my-dependency`. If my-dependency has a bsconfig.json too, then everything will work seamlessly.
11+
],
12+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"name": "${bsb:name}",
3+
"version": "${bsb:proj-version}",
4+
"scripts": {
5+
"clean": "bsb -clean-world",
6+
"build": "bsb -make-world",
7+
"watch": "bsb -make-world -w"
8+
},
9+
"keywords": [
10+
"BuckleScript"
11+
],
12+
"license": "MIT",
13+
"devDependencies": {
14+
"bs-platform": "${bsb:bs-version}"
15+
}
16+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Js.log "Hello, BuckleScript and Reason!";
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"version": "${bsb:proj-version}",
3+
"command": "npm",
4+
"options": {
5+
"cwd": "${workspaceRoot}"
6+
},
7+
"isShellCommand": true,
8+
"args": [
9+
"run",
10+
"watch"
11+
],
12+
"showOutput": "always",
13+
"isBackground": true,
14+
"problemMatcher": {
15+
"fileLocation": "absolute",
16+
"owner": "ocaml",
17+
"watching": {
18+
"activeOnStart": false,
19+
"beginsPattern": ">>>> Start compiling",
20+
"endsPattern": ">>>> Finish compiling"
21+
},
22+
"pattern": [
23+
{
24+
"regexp": "^File \"(.*)\", line (\\d+)(?:, characters (\\d+)-(\\d+))?:$",
25+
"file": 1,
26+
"line": 2,
27+
"column": 3,
28+
"endColumn": 4
29+
},
30+
{
31+
"regexp": "^(?:(?:Parse\\s+)?(Warning|[Ee]rror)(?:\\s+\\d+)?:)?\\s+(.*)$",
32+
"severity": 1,
33+
"message": 2,
34+
"loop": true
35+
}
36+
]
37+
}
38+
}

0 commit comments

Comments
 (0)