|
1 | 1 | { |
2 | | - "$schema": "https://json-schema.org/draft/2020-12/schema", |
3 | | - "$id": "https://yarnspinner.dev/schemas/yarnproject.schema.json", |
| 2 | + "$schema": "http://json-schema.org/draft-07/schema#", |
| 3 | + "$id": "https://schemas.yarnspinner.dev/yarnproject.schema.json", |
| 4 | + "$comment": "Yarn Spinner project file schema, version 4.", |
| 5 | + "version": 4, |
4 | 6 | "title": "Yarn Spinner Project", |
5 | 7 | "description": "Configuration file for a Yarn Spinner project (.yarnproject)", |
6 | 8 | "type": "object", |
7 | 9 | "required": ["projectFileVersion", "sourceFiles", "baseLanguage"], |
8 | 10 | "properties": { |
9 | 11 | "projectFileVersion": { |
10 | 12 | "type": "integer", |
11 | | - "description": "The version of the project file format. Current version is 4. Versions 2 and 3 are also supported for legacy projects.", |
12 | | - "enum": [2, 3, 4], |
| 13 | + "description": "The version of the project file format.", |
| 14 | + "minimum": 2, |
13 | 15 | "default": 4 |
14 | 16 | }, |
| 17 | + "projectName": { |
| 18 | + "type": "string", |
| 19 | + "description": "The display name of the project." |
| 20 | + }, |
| 21 | + "authorName": { |
| 22 | + "type": "array", |
| 23 | + "description": "The author(s) of the project.", |
| 24 | + "items": { "type": "string" } |
| 25 | + }, |
15 | 26 | "sourceFiles": { |
16 | 27 | "type": "array", |
17 | | - "description": "Array of glob patterns specifying which .yarn files to include in this project.", |
18 | | - "items": { |
19 | | - "type": "string" |
20 | | - }, |
| 28 | + "description": "Glob patterns specifying which .yarn files to include. Relative to the .yarnproject location.", |
| 29 | + "items": { "type": "string" }, |
21 | 30 | "default": ["**/*.yarn"] |
22 | 31 | }, |
23 | 32 | "excludeFiles": { |
24 | 33 | "type": "array", |
25 | | - "description": "Array of glob patterns specifying which files to exclude from the project.", |
26 | | - "items": { |
27 | | - "type": "string" |
28 | | - } |
29 | | - }, |
30 | | - "authorName": { |
31 | | - "type": "string" |
32 | | - }, |
33 | | - "projectName": { |
34 | | - "type": "string" |
| 34 | + "description": "Glob patterns specifying files to exclude, even if they match sourceFiles.", |
| 35 | + "items": { "type": "string" } |
35 | 36 | }, |
36 | 37 | "baseLanguage": { |
37 | 38 | "type": "string", |
| 39 | + "description": "The language code for the source language of dialogue in .yarn files (e.g. 'en', 'ja', 'zh-Hans').", |
38 | 40 | "default": "en" |
39 | 41 | }, |
40 | 42 | "localisation": { |
41 | 43 | "type": "object", |
42 | | - "description": "Localization configuration mapping language codes to their string tables and asset directories.", |
| 44 | + "description": "Maps language codes to their string tables and asset directories for translation.", |
43 | 45 | "additionalProperties": { |
44 | | - "type": "object", |
45 | | - "properties": { |
46 | | - "strings": { |
47 | | - "type": "string", |
48 | | - "description": "Path to the CSV file containing translated strings for this language." |
49 | | - }, |
50 | | - "assets": { |
51 | | - "type": "string", |
52 | | - "description": "Path to the directory containing localized assets for this language." |
53 | | - } |
| 46 | + "type": "object", |
| 47 | + "properties": { |
| 48 | + "strings": { |
| 49 | + "type": "string", |
| 50 | + "description": "Path to the CSV file containing translated strings." |
54 | 51 | }, |
55 | | - "additionalProperties": false |
56 | | - } |
| 52 | + "assets": { |
| 53 | + "type": "string", |
| 54 | + "description": "Path to the directory containing localized assets." |
| 55 | + } |
| 56 | + }, |
| 57 | + "additionalProperties": false |
57 | 58 | } |
58 | 59 | }, |
59 | 60 | "definitions": { |
60 | | - "description": "Path(s) to .ysls.json files containing custom command and function definitions.", |
| 61 | + "description": "Path(s) to .ysls.json definition files for custom commands and functions.", |
61 | 62 | "oneOf": [ |
62 | | - { |
63 | | - "type": "string" |
64 | | - }, |
65 | | - { |
66 | | - "type": "array", |
67 | | - "items": { |
68 | | - "type": "string" |
69 | | - } |
70 | | - } |
| 63 | + { "type": "string" }, |
| 64 | + { "type": "array", "items": { "type": "string" } } |
71 | 65 | ] |
72 | 66 | }, |
73 | 67 | "compilerOptions": { |
74 | 68 | "type": "object", |
75 | | - "description": "Compiler configuration options.", |
| 69 | + "description": "Options that affect compilation. Used by all parts of the Yarn Spinner pipeline.", |
76 | 70 | "properties": { |
77 | 71 | "requireVariableDeclarations": { |
78 | 72 | "type": "boolean", |
| 73 | + "description": "If true, all variables must be declared with <<declare>> before use.", |
79 | 74 | "default": false |
80 | 75 | }, |
81 | 76 | "allowPreviewFeatures": { |
82 | 77 | "type": "boolean", |
| 78 | + "description": "If true, enables experimental language features that may change.", |
83 | 79 | "default": false |
84 | 80 | } |
85 | 81 | }, |
86 | 82 | "additionalProperties": true |
87 | 83 | }, |
88 | 84 | "editorOptions": { |
89 | 85 | "type": "object", |
90 | | - "description": "Editor and tooling configuration.", |
| 86 | + "description": "Editor and tooling configuration. Each editor/engine gets its own sub-object.", |
91 | 87 | "properties": { |
92 | | - "disableSpellcheck": { "type": "boolean", "default": false }, |
93 | | - "spellcheckWords": { "type": "array", "items": { "type": "string" }, "default": [] }, |
94 | | - "defaultPresenter": { "type": "string", "default": "try" }, |
95 | | - "editorCharacterColors": { |
96 | | - "type": "array", |
97 | | - "items": { |
98 | | - "type": "object", |
99 | | - "properties": { |
100 | | - "id": { "type": "string" }, |
101 | | - "name": { "type": "string" }, |
102 | | - "colour": { "type": "string", "pattern": "^#[0-9A-Fa-f]{6}$" }, |
103 | | - "portraitPath": { "type": "string" } |
104 | | - } |
105 | | - } |
106 | | - }, |
107 | | - "editorFontSize": { "type": "number", "minimum": 8, "maximum": 72 }, |
108 | | - "previewFontSize": { "type": "number", "minimum": 8, "maximum": 72 }, |
109 | | - "startNode": { "type": "string" }, |
110 | | - "projectGraphPositions": { |
111 | | - "type": "object", |
112 | | - "additionalProperties": { |
113 | | - "type": "object", |
114 | | - "properties": { "x": { "type": "number" }, "y": { "type": "number" } } |
115 | | - } |
116 | | - }, |
117 | | - "projectGraphColours": { |
118 | | - "type": "object", |
119 | | - "additionalProperties": { "type": ["string", "null"] } |
120 | | - } |
| 88 | + "yarnScriptEditor": { "$ref": "yarnscripteditor.schema.json" } |
121 | 89 | }, |
122 | 90 | "additionalProperties": true |
123 | | - }, |
124 | | - "characters": { |
125 | | - "type": "array", |
126 | | - "description": "List of character definitions for the project.", |
127 | | - "items": { |
128 | | - "type": "object", |
129 | | - "required": ["name"], |
130 | | - "properties": { |
131 | | - "name": { |
132 | | - "type": "string" |
133 | | - }, |
134 | | - "displayName": { |
135 | | - "type": "string" |
136 | | - }, |
137 | | - "color": { |
138 | | - "type": "string", |
139 | | - "pattern": "^#[0-9A-Fa-f]{6}$" |
140 | | - }, |
141 | | - "colour": { |
142 | | - "type": "string", |
143 | | - "pattern": "^#[0-9A-Fa-f]{6}$" |
144 | | - }, |
145 | | - "description": { |
146 | | - "type": "string" |
147 | | - }, |
148 | | - "portraitPath": { |
149 | | - "type": "string" |
150 | | - } |
151 | | - }, |
152 | | - "additionalProperties": false |
153 | | - } |
154 | | - }, |
155 | | - "imagePath": { |
156 | | - "type": "string", |
157 | | - "description": "Path to a directory containing image files referenced by node 'image' headers." |
158 | | - }, |
159 | | - "saliencyStrategy": { |
160 | | - "type": "string", |
161 | | - "description": "Strategy for selecting dialogue when multiple options are available.", |
162 | | - "enum": ["first", "best", "bestLeastRecentlyViewed", "bestLeastRecentlyViewedRandom"], |
163 | | - "default": "bestLeastRecentlyViewed" |
164 | 91 | } |
165 | 92 | }, |
166 | 93 | "additionalProperties": false |
|
0 commit comments