-
Notifications
You must be signed in to change notification settings - Fork 46
/
bsconfig.schema.json
304 lines (304 loc) · 13.2 KB
/
bsconfig.schema.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
{
"title": "JSON schema for bsconfig.json configuration files",
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"dependencies": {
"deploy": [
"host",
"password"
]
},
"properties": {
"extends": {
"description": "Relative or absolute path to another bsconfig.json file that this file should use as a base and then override. Prefix with a question mark (?) to prevent throwing an exception if the file does not exist.",
"type": "string"
},
"cwd": {
"description": "A path that will be used to override the current working directory",
"type": "string"
},
"rootDir": {
"description": "The root directory of your Roku project. Defaults to the current working directory (or cwd property)",
"type": "string"
},
"manifest": {
"description": "A entry to modify manifest values",
"type": "object",
"properties": {
"bs_const": {
"description": "A dictionary of bs_consts to change or add to the manifest. Each entry ",
"type": "object",
"patternProperties": {
"^.+$": {
"type": [
"boolean",
"null"
]
}
}
}
}
},
"files": {
"description": "The list of files that should be used in this project. Supports globs. Optionally, you can specify an object with `src` and `dest` properties to move files from one location into a different destination location",
"default": [
"manifest",
"source/**/*.*",
"components/**/*.*",
"images/**/*.*"
],
"type": "array",
"items": {
"anyOf": [
{
"type": "string",
"description": "A file path or file glob"
},
{
"type": "object",
"properties": {
"src": {
"anyOf": [
{
"type": "string",
"description": "A file path or glob pattern of source file(s)"
},
{
"type": "array",
"description": "An array of file path or globs",
"items": {
"type": "string",
"description": "A file path or glob pattern of source file(s)"
}
}
]
},
"dest": {
"type": "string",
"description": "The destination for the file(s) found in 'src'"
}
},
"required": [
"src",
"dest"
]
}
]
}
},
"outFile": {
"description": "The path where the output zip or package should be placed. This includes the filename. Defaults to \"./out/package\"",
"type": "string"
},
"createPackage": {
"description": "Creates a zip package. Defaults to true. This setting is ignored when deploy is enabled.",
"type": "boolean"
},
"sourceMap": {
"description": "Enables generating sourcemap files, which allow debugging tools to show the original source code while running the emitted files.",
"type": "boolean",
"default": false
},
"copyToStaging": {
"description": "If true, the files are copied to staging. This setting is ignored when deploy is enabled or if createPackage is enabled",
"type": "boolean"
},
"watch": {
"description": "If true, the server will keep running and will watch and recompile on every file change",
"type": "boolean",
"default": false
},
"deploy": {
"description": "If true, after a successful buld, the project will be deployed to the roku specified in host",
"type": "boolean"
},
"host": {
"description": "The host of the Roku that the package will be deploy to",
"type": "string"
},
"username": {
"description": "The username to use when deploying to a Roku device",
"type": "string"
},
"password": {
"description": " The password to use when deploying to a Roku device",
"type": "string"
},
"retainStagingDir": {
"type": "boolean",
"description": "Prevent the staging folder from being deleted after the deployment package is created. This is helpful for troubleshooting why your package isn't being created the way you expected.",
"default": false
},
"retainStagingFolder": {
"type": "boolean",
"deprecated": true,
"description": "Prevent the staging folder from being deleted after the deployment package is created. This is helpful for troubleshooting why your package isn't being created the way you expected.",
"default": false
},
"stagingDir": {
"type": "string",
"description": "The path to the staging folder (where all files are copied before creating the zip package)"
},
"stagingFolderPath": {
"type": "string",
"deprecated": true,
"deprecationMessage": "Deprecated. Use `stagingDir` instead.",
"description": "The path to the staging folder (where all files are copied before creating the zip package)"
},
"ignoreErrorCodes": {
"description": "A list of error codes the compiler should NOT emit, even if encountered.",
"type": "array",
"deprecated": true,
"deprecationMessage": "Deprecated. Use `diagnosticFilters` instead.",
"items": {
"anyOf": [
{
"type": "number",
"description": "A BrighterScript error code that will be ignored during compile"
}
]
}
},
"diagnosticSeverityOverrides": {
"description": "A map of error codes with their severity level override (error|warn|info)",
"type": "object",
"patternProperties": {
".{1,}": {
"type": [
"number",
"string"
],
"enum": [
"error",
"warn",
"info",
"hint"
]
}
}
},
"emitFullPaths": {
"description": "Emit full paths to files when printing diagnostics to the console.",
"type": "boolean",
"default": false
},
"emitDefinitions": {
"description": "Emit type definition files (`d.bs`) during transpile",
"type": "boolean",
"default": false
},
"removeParameterTypes": {
"description": "Removes the explicit type to function's parameters and return (i.e. the `as type` syntax) ",
"type": "boolean",
"default": false
},
"diagnosticFilters": {
"description": "A collection of filters used to hide diagnostics for certain files",
"type": "array",
"items": {
"anyOf": [
{
"type": "number",
"description": "The code of a diagnostic that should be filtered from all files"
},
{
"type": "string",
"description": "A file path relative to rootDir, an absolute path, or a file glob pointing to file(s) you wish to filter diagnostics from."
},
{
"type": "object",
"description": "A file path relative to rootDir, an absolute path, or a file glob pointing to file(s) you wish to filter diagnostics from.",
"properties": {
"src": {
"type": "string",
"description": "A file path relative to rootDir, an absolute path, or a file glob pointing to file(s) you wish to filter diagnostics from."
},
"codes": {
"type": "array",
"description": "A list of codes of diagnostics that should be filtered out from the files matched in 'src'`. If omitted, all error codes are used",
"items": {
"anyOf": [
{
"type": [
"number",
"string"
],
"description": "A code of diagnostics that should be filtered out from the files matched in 'src'"
}
]
}
}
}
}
]
}
},
"plugins": {
"description": "A list of node scripts or npm modules to add extra diagnostics or transform the AST.",
"type": "array",
"items": {
"anyOf": [
{
"type": "string",
"description": "a path to a node script or an npm module to load dynamically"
}
]
}
},
"require": {
"description": "A list of scripts or modules to pass to node's `require()` on startup. This is useful for doing things like ts-node registration",
"type": "array",
"items": {
"anyOf": [
{
"type": "string",
"description": "a path to a node script or an npm module to load dynamically at startup."
}
]
}
},
"autoImportComponentScript": {
"description": "When enabled, every xml component will search for a .bs or .brs file with the same name in the same folder, and add it as a script import if found. Disabled by default",
"type": "boolean",
"default": false
},
"logLevel": {
"description": "The amount of detail that should be printed to the console",
"type": "string",
"default": "log",
"enum": [
"error",
"warn",
"log",
"info",
"debug",
"trace"
]
},
"sourceRoot": {
"description": "Override the root directory path where debugger should locate the source files. The location will be embedded in the source map to help debuggers locate the original source files. This only applies to files found within rootDir. This is useful when you want to preprocess files before passing them to BrighterScript, and want a debugger to open the original files. This option also affects the `SOURCE_FILE_PATH` and `SOURCE_LOCATION` source literals.",
"type": "string"
},
"resolveSourceRoot": {
"description": "Should the `sourceRoot` property be resolve to an absolute path (relative to the bsconfig it's defined in)",
"type": "boolean",
"default": false
},
"diagnosticLevel": {
"description": "Specify what diagnostic levels are printed to the console. This has no effect on what diagnostics are reported in the LanguageServer. Defaults to 'warn'",
"type": "string",
"default": "log",
"enum": [
"hint",
"info",
"warn",
"error"
]
},
"allowBrighterScriptInBrightScript": {
"description": "Allow brighterscript features (classes, interfaces, etc...) to be included in BrightScript (`.brs`) files, and force those files to be transpiled.",
"type": "boolean",
"default": false
}
}
}