|
35 | 35 | "$ref": "#/definitions/single-ppx-spec" |
36 | 36 | } |
37 | 37 | }, |
| 38 | + "bs-dependency" : { |
| 39 | + "type" : "string", |
| 40 | + "title": "dependency" |
| 41 | + }, |
38 | 42 | "bs-dependencies": { |
39 | 43 | "type": "array", |
40 | 44 | "items": { |
41 | | - "type": "string" |
| 45 | + "$ref": "#/definitions/bs-dependency" |
42 | 46 | }, |
43 | 47 | "description": "Bucklescript package dependencies" |
44 | 48 | }, |
45 | 49 | "sourceItem": { |
46 | 50 | "title": "sourceItem", |
| 51 | + "oneOf" : [ |
| 52 | + { |
| 53 | + "type" : "object", |
47 | 54 | "properties": { |
48 | 55 | "dir": { |
49 | 56 | "type": "string" |
|
93 | 100 | { |
94 | 101 | "enum": [ |
95 | 102 | "all" |
96 | | - ] |
| 103 | + ], |
| 104 | + "description": "All modules in this directory" |
97 | 105 | }, |
98 | 106 | { |
99 | 107 | "type": "array", |
100 | 108 | "items": { |
101 | 109 | "type": "string" |
102 | | - } |
| 110 | + }, |
| 111 | + "description": "Selected modules, for example, [Module_a, Module_b] " |
103 | 112 | } |
104 | | - ] |
| 113 | + ], |
| 114 | + "description": "default: export all modules by default, it is recommended for library developers to hide some interfaces" |
105 | 115 | }, |
106 | 116 | "resources": { |
107 | 117 | "type": "array", |
|
110 | 120 | } |
111 | 121 | }, |
112 | 122 | "subdirs": { |
113 | | - "type": "array", |
114 | | - "items": { |
115 | | - "$ref": "#/definitions/sourceItem" |
116 | | - } |
| 123 | + "$ref" : "#/definitions/sources", |
| 124 | + "description": "nested specifications inside" |
117 | 125 | }, |
118 | 126 | "group": { |
119 | 127 | "oneOf": [ |
|
132 | 140 | } |
133 | 141 | } |
134 | 142 | } |
135 | | - ] |
| 143 | + ], |
| 144 | + "description": "Not implemented yet" |
136 | 145 | }, |
137 | 146 | "internal-depends": { |
138 | 147 | "type": "array", |
|
145 | 154 | "required": [ |
146 | 155 | "dir" |
147 | 156 | ] |
| 157 | + }, |
| 158 | + { |
| 159 | + "title": "single non nested directory", |
| 160 | + "type" : "string", |
| 161 | + "description": "directory name (no nested)" |
| 162 | + } |
| 163 | + ] |
| 164 | + }, |
| 165 | + "sources" : { |
| 166 | + "oneOf": [ |
| 167 | + { |
| 168 | + "type": "array", |
| 169 | + "items": { |
| 170 | + "$ref": "#/definitions/sourceItem" |
| 171 | + }, |
| 172 | + "description" : "A list of source items" |
| 173 | + }, |
| 174 | + { |
| 175 | + "$ref": "#/definitions/sourceItem", |
| 176 | + "description": "A single source item" |
| 177 | + } |
| 178 | + ], |
| 179 | + "description": "can be either a single sourceItem or an array of sourceItems, sourceItem can be either a single string(non nested directory) or an detailed object config" |
148 | 180 | }, |
149 | 181 | "stringArray": { |
150 | 182 | "type": "array", |
|
208 | 240 | "description": "external include directories, which will be applied -I to all compilation units, it is *not needed* in most cases" |
209 | 241 | }, |
210 | 242 | "sources": { |
211 | | - "oneOf": [ |
212 | | - { |
213 | | - "type": "array", |
214 | | - "items": { |
215 | | - "$ref": "#/definitions/sourceItem" |
216 | | - }, |
217 | | - "description" : "A list of source items" |
218 | | - }, |
219 | | - { |
220 | | - "$ref": "#/definitions/sourceItem", |
221 | | - "description": "A single source item" |
222 | | - } |
223 | | - ] |
| 243 | + "$ref" : "#/definitions/sources", |
| 244 | + "description": "specication of where source code is " |
224 | 245 | }, |
225 | 246 |
|
226 | 247 | "generate-merlin": { |
227 | 248 | "type": "boolean", |
228 | | - "description": "default false (generate .merlin)" |
| 249 | + "description": "default true (generate .merlin)" |
229 | 250 | } |
230 | 251 | }, |
231 | 252 | "additionalProperties": false, |
|
0 commit comments