forked from SchemaStore/schemastore
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcosmos-config.json
227 lines (227 loc) · 6.99 KB
/
cosmos-config.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
{
"$schema": "http://json-schema.org/draft-04/schema",
"title": "JSON schema for React Cosmos configs",
"type": "object",
"additionalProperties": false,
"properties": {
"$schema": {
"type": "string"
},
"rootDir": {
"description": "The root directory that all others paths in this config are relative to. Usually the root of your repo. If omitted, rootDir is equal to the directory containing your Cosmos config. When you don't use a Cosmos config, rootDir defaults to the current working directory.",
"type": "string",
"minLength": 1
},
"exportPath": {
"description": "Where to generate static exports on disk. [default: \"cosmos-export\"]",
"type": "string",
"minLength": 1
},
"disablePlugins": {
"description": "Disable plugins",
"type": "boolean"
},
"staticPath": {
"description": "Dir path to serve static assets from.",
"type": "string",
"minLength": 1
},
"publicUrl": {
"description": "Base URL for static assets. [default: \"/\"]",
"type": "string"
},
"fixturesDir": {
"description": "Name for directories that contain fixtures (eg. __fixtures__/example.jsx). [default: \"__fixtures__\"]",
"type": "string",
"minLength": 1
},
"fixtureFileSuffix": {
"description": "Suffix for fixture files (eg. example.fixture.jsx). [default: \"fixture\"]",
"type": "string",
"minLength": 1
},
"watchDirs": {
"description": "Directories where the Cosmos server watches for fixture files changes while running. [default: [\".\"]]",
"type": "array",
"items": {
"type": "string",
"minLength": 1
},
"uniqueItems": true
},
"userDepsFilePath": {
"description": "Where to generate a file that contains a map to all fixtures and other Cosmos-related user modules. Only used in setups where Cosmos can't piggyback on the user's build (eg. React Native setups). [default: \"cosmos.userdeps.js\"]",
"type": "string",
"minLength": 1
},
"hostname": {
"description": "Dev server hostname. Set to null to accept connections with any hostname. [default: null]",
"anyOf": [
{
"type": "string",
"minLength": 1
},
{
"type": "null"
}
]
},
"port": {
"description": "Dev server port. [default: 5000]",
"type": "number"
},
"https": {
"description": "Server will be served over HTTPS",
"type": "boolean"
},
"httpsOptions": {
"description": "Additional options for HTTPS server",
"type": "object",
"additionalProperties": false,
"properties": {
"certPath": {
"description": "Path of a certificate file",
"type": "string"
},
"keyPath": {
"description": "Path of a certificate's key file",
"type": "string"
}
}
},
"httpProxy": {
"description": "Proxy some URLs to a different HTTP server (eg. an API backend dev server). Similar to devServer.proxy in webpack config.",
"type": "object",
"patternProperties": {
".*": {
"anyOf": [
{
"type": "string"
},
{
"type": "object",
"description": "Advanced HTTP proxy config.",
"additionalProperties": true,
"required": ["target"],
"properties": {
"target": {
"type": "string"
},
"secure": {
"type": "boolean"
},
"pathRewrite": {
"type": "object",
"patternProperties": {
".*": {
"type": "string"
}
}
},
"logLevel": {
"type": "string",
"enum": ["error", "debug", "info", "warn", "silent"]
}
}
}
]
}
}
},
"globalImports": {
"description": "Modules to be imported before loading components. Stuff like reset.css, polyfills, etc.",
"type": "array",
"items": {
"type": "string",
"minLength": 1
},
"uniqueItems": true
},
"dom": {
"description": "DOM-related options",
"type": "object",
"properties": {
"containerQuerySelector": {
"description": "Document selector for existing element to use as component parent (eg. #root). A blank container element is created from scratch if no selector is provided. [default: null]",
"type": ["string", "null"],
"minLength": 1
}
}
},
"webpack": {
"description": "Webpack-related options",
"type": "object",
"additionalProperties": false,
"properties": {
"configPath": {
"description": "Path to an existing webpack config, which Cosmos will reuse to build your code. Set to null to disable this behavior. [default \"webpack.config.js\"]",
"anyOf": [
{
"type": "string",
"minLength": 1
},
{
"type": "null"
}
]
},
"overridePath": {
"description": "Path to a user module that customizes the webpack config used by Cosmos. Set to null to disable this behavior. [default \"webpack.override.js\"]",
"anyOf": [
{
"type": "string",
"minLength": 1
},
{
"type": "null"
}
]
},
"includeHashInOutputFilename": {
"description": "Changes output filename from \"[name].js\" to \"[name].[contenthash].js\". [default: false]",
"type": "boolean"
},
"hotReload": {
"description": "Enable webpack's Hot Module Replacement. [default: true]",
"type": "boolean"
}
}
},
"ui": {
"description": "UI plugin options",
"type": "object",
"additionalProperties": true,
"properties": {
"responsivePreview": {
"type": "object",
"additionalProperties": false,
"properties": {
"devices": {
"description": "List of device viewports",
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"required": ["label", "width", "height"],
"properties": {
"label": {
"type": "string",
"minLength": 1
},
"width": {
"type": "number",
"minimum": 1
},
"height": {
"type": "number",
"minimum": 1
}
}
}
}
}
}
}
}
}
}