Skip to content

Commit 0a53141

Browse files
authored
Merge pull request rescript-lang#870 from bloomberg/prepare_bsconfig_json
add the initial schema
2 parents 8cb806d + e620ecd commit 0a53141

File tree

4 files changed

+99
-65
lines changed

4 files changed

+99
-65
lines changed

docs/docson/build-schema.json

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-04/schema#",
3+
"definitions" : {
4+
"sourceItem" : {
5+
"title" : "sourceItem",
6+
"properties": {
7+
"dir" : {
8+
"type" : "string"
9+
},
10+
"files" : {
11+
"type" : "array",
12+
"items" : {
13+
"type" : "string"
14+
}
15+
},
16+
"subdirs" : {
17+
"type" : "array",
18+
"items" : {
19+
"$ref" : "#/definitions/sourceItem"
20+
}
21+
}
22+
}
23+
}
24+
},
25+
"title": "BuckleScript build configuration",
26+
"type": "object",
27+
"properties" : {
28+
"version" : {
29+
"type" : "string",
30+
"description": "The semantic version of the ocaml library"
31+
},
32+
"name" : {
33+
"type" : "string",
34+
"description": "package name"
35+
},
36+
"ocaml-config" : {
37+
"type": "object",
38+
"properties": {
39+
"bsdep": {
40+
"type": "string",
41+
"description": "the path to bsdep"
42+
},
43+
"bsbuild": {
44+
"type": "string",
45+
"description": "the path to bsbuild"
46+
},
47+
"bsc": {
48+
"type": "string",
49+
"description": "the path to bsc"
50+
},
51+
"external-includes": {
52+
"type": "array",
53+
"items": {
54+
"type": "array"
55+
},
56+
"description": "external include directories, which will be applied -I to all compilation units, it is not needed in most cases"
57+
},
58+
"bs-lib-dir" : {
59+
"type" : "string",
60+
"description": "path to install bucklescript ocaml libs, used for its dependent compilation, default to /lib/buckle "
61+
},
62+
"ocaml-dependencies" : {
63+
"type" : "array",
64+
"items" : {
65+
"type" : "string"
66+
},
67+
"description": "the ocaml dependencies available on npm"
68+
},
69+
"copy-or-symlink": {
70+
"type": "array",
71+
"items": {
72+
"type": "string"
73+
},
74+
"description" : "the resource files, the use case is in test build, we need keep the same relative path between code and resources"
75+
},
76+
"sources" : {
77+
"type" : "array",
78+
"items": {
79+
"$ref" : "#/definitions/sourceItem"
80+
}
81+
}
82+
}
83+
}
84+
},
85+
"items": {
86+
"$ref": "#/definitions/Product"
87+
}
88+
}
89+

docs/docson/build.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[
2+
"trigger", ".", {
3+
"name": "build",
4+
"expression": ["pcre", "(\\.(sh|json)$)"],
5+
"command": ["./build.sh"],
6+
"append_files" : true
7+
}
8+
]

docs/docson/build.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/bin/sh
2+
reload

docs/docson/example.json

Lines changed: 0 additions & 65 deletions
This file was deleted.

0 commit comments

Comments
 (0)