Skip to content

Commit 439a520

Browse files
committed
adjust bsconfig accordint to the schema
1 parent 1a7cd6f commit 439a520

File tree

2 files changed

+29
-20
lines changed

2 files changed

+29
-20
lines changed

bsconfig.json

+23-13
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,40 @@
11
{
2-
"config" :
2+
"name" :"bs-platform",
3+
"version": "1.2.1",
4+
"ocaml-config" :
35
{
46
"bsdep" : "jscomp/bin/bsdep.exe",
57
"bsbuild" : "jscomp/bin/bsbuild.exe",
68
"bsc" : "jscomp/bin/bsc.exe",
7-
"external-includes" : ["jscomp/runtime", "jscomp/stdlib", "jscomp/others"],
8-
"package-name" : "bs-platform", // could be inferred from package.json?
9+
"bs-external-includes" : [
10+
"jscomp/runtime",
11+
"jscomp/stdlib",
12+
"jscomp/others"
13+
],
14+
15+
916
"bsc-flags" :
1017
[
1118
"-w", "-40", "-bs-no-version-header", "-bs-cross-module-opt"
1219
],
13-
14-
"copy-or-symlink" :
20+
"bs-copy-or-symlink" :
1521
// for out of source build, on Unix will do a symlink
1622
// on windows will copy
1723
[
1824
"jscomp/test/flow_parser_sample.js",
1925
"jscomp/test/joinClasses.js"
2026
]
21-
22-
},
23-
"file-groups" :
27+
,
28+
"sources" :
2429
[
25-
{
26-
"directory" : "jscomp/test/" ,
27-
// so the design is this way
30+
// so the design is this way
2831
// if we find
2932
// "files" : [
3033
// ]
3134
// we will update it *before* spitting out build.ninja
35+
36+
{
37+
"dir" : "jscomp/test/" ,
3238
"files" : [
3339
"watch_test.ml"
3440
, "utf8_decode_test.ml"
@@ -435,6 +441,11 @@
435441
]
436442

437443
}
444+
]
445+
}
446+
}
447+
448+
438449
/* ,
439450
{
440451
"directory" : "jscomp/test/cyc",
@@ -452,5 +463,4 @@
452463
]
453464

454465
}
455-
*/ ]
456-
}
466+
*/

docs/docson/build-schema.json

+6-7
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@
1919
"$ref" : "#/definitions/sourceItem"
2020
}
2121
}
22-
}
22+
},
23+
"required": ["dir","files"]
2324
},
2425
"stringArray" : {
2526
"type" : "array",
@@ -40,7 +41,6 @@
4041
"description": "package name"
4142
},
4243
"ocaml-config" : {
43-
"type": "object",
4444
"properties": {
4545
"bsdep": {
4646
"type": "string",
@@ -67,10 +67,6 @@
6767
},
6868
"bs-external-includes": {
6969
"$ref": "#/definitions/stringArray",
70-
"type": "array",
71-
"items": {
72-
"type": "array"
73-
},
7470
"description": "external include directories, which will be applied -I to all compilation units, it is not needed in most cases"
7571
},
7672
"bs-lib-dir": {
@@ -94,9 +90,12 @@
9490
"$ref" : "#/definitions/sourceItem"
9591
}
9692
}
97-
}
93+
},
94+
"required": ["sources"] ,
95+
"additionalProperties": false
9896
}
9997
},
10098
"required": ["version", "name", "ocaml-config"]
99+
101100
}
102101

0 commit comments

Comments
 (0)