Skip to content

Commit 393903e

Browse files
committed
Build schema
1 parent 2b2529b commit 393903e

File tree

2 files changed

+40
-9
lines changed

2 files changed

+40
-9
lines changed

bsconfig.json

Lines changed: 31 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
{
2+
"$schema": "https://raw.githubusercontent.com/rescript-lang/rescript-compiler/master/docs/docson/build-schema.json",
23
"name": "rescript-lang.org",
34
"namespace": false,
4-
"reason": { "react-jsx": 3 },
5+
"reason": {
6+
"react-jsx": 3
7+
},
58
"refmt": 3,
69
"bs-dependencies": [
710
"reason-react",
@@ -11,12 +14,28 @@
1114
],
1215
"ppx-flags": [],
1316
"sources": [
14-
{ "dir": "common" },
15-
{ "dir": "bindings" },
16-
{ "dir": "pages", "subdirs": true },
17-
{ "dir": "re_pages", "subdirs": true },
18-
{ "dir": "scripts", "subdirs": true },
19-
{ "dir": "components", "subdirs": true },
17+
{
18+
"dir": "common"
19+
},
20+
{
21+
"dir": "bindings"
22+
},
23+
{
24+
"dir": "pages",
25+
"subdirs": true
26+
},
27+
{
28+
"dir": "re_pages",
29+
"subdirs": true
30+
},
31+
{
32+
"dir": "scripts",
33+
"subdirs": true
34+
},
35+
{
36+
"dir": "components",
37+
"subdirs": true
38+
},
2039
"layouts"
2140
],
2241
"package-specs": {
@@ -27,7 +46,11 @@
2746
"error": "+8"
2847
},
2948
"suffix": ".bs.js",
30-
"bsc-flags": ["-bs-no-version-header", "-bs-super-errors", "-bs-g"],
49+
"bsc-flags": [
50+
"-bs-no-version-header",
51+
"-bs-super-errors",
52+
"-bs-g"
53+
],
3154
"gentypeconfig": {
3255
"language": "untyped",
3356
"shims": [],

pages/docs/manual/latest/build-configuration.mdx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,15 @@ canonical: "/docs/manual/latest/build-configuration"
88

99
`bsconfig.json` is the single, mandatory build meta file needed for bsb.
1010

11-
**The complete configuration schema is [here](https://bucklescript.github.io/bucklescript/docson/#build-schema.json)**. We'll _non-exhaustively_ highlight the important parts in prose here.
11+
**The complete configuration schema is [here](https://raw.githubusercontent.com/rescript-lang/rescript-compiler/master/docs/docson/build-schema.json)**. We'll _non-exhaustively_ highlight the important parts in prose below.
12+
13+
## Tips & Tricks
14+
15+
If you're using an editor like VSCode, put the following code as your first field in `bsconfig.json` to get schema autocompletion!
16+
17+
```json
18+
"$schema": "https://raw.githubusercontent.com/rescript-lang/rescript-compiler/master/docs/docson/build-schema.json"
19+
```
1220

1321
## name, namespace
1422

0 commit comments

Comments
 (0)