-
Notifications
You must be signed in to change notification settings - Fork 0
/
dioxus.schema.json
138 lines (138 loc) · 5.63 KB
/
dioxus.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
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://raw.githubusercontent.com/umnovI/dioxus-config-schema/dioxus.schema.json",
"title": "Dioxus TOML",
"description": "Dioxus project configuration file",
"$comment": "Full documentation can me found at https://dioxuslabs.com/learn/0.5/CLI/configure",
"type": "object",
"properties": {
"application": {
"description": "Application-wide configuration. Applies to both web and desktop.",
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Project name & title."
},
"default_platform": {
"description": "The platform this project targets",
"type": "string",
"enum": ["web", "desktop"]
},
"out_dir": {
"description": "The directory to place the build artifacts from dx build or dx serve into.\nThis is also where the assets directory will be copied into.",
"type": "string"
},
"asset_dir": {
"description": "The directory with your static assets.\nThe CLI will automatically copy these assets into the `out_dir` after a build/serve",
"type": "string"
},
"sub_package": {
"description": "The sub package in the workspace to build by default.",
"type": "string"
}
},
"required": ["name", "default_platform"]
},
"web": {
"type": "object",
"properties": {
"app": {
"description": "Web-specific configuration.",
"type": "object",
"properties": {
"title": {
"description": "The title of the web page.\n`HTML` title tag content",
"type": "string"
},
"base_path": {
"description": "The base path to build the application for serving at. This can be useful when serving your application in a subdirectory under a domain. For example, when building a site to be served on GitHub Pages.",
"type": "string"
}
}
},
"watcher": {
"description": "Development server configuration.",
"type": "object",
"properties": {
"reload_html": {
"description": "If this is true, the cli will rebuild the index.html file every time the application is rebuilt",
"type": "boolean"
},
"watch_path": {
"description": "The files & directories to monitor for changes",
"type": "array",
"items": {
"description": "The files & directories to monitor for changes",
"type": "string"
}
},
"index_on_404": {
"description": "If enabled, Dioxus will serve the root page when a route is not found.This is needed when serving an application that uses the router. However, when serving your app using something else than Dioxus (e.g. GitHub Pages), you will have to check how to configure it on that platform. In GitHub Pages, you can make a copy of index.html named 404.html in the same directory.",
"type": "boolean"
}
}
},
"resource": {
"description": "Static resource configuration.",
"type": "object",
"properties": {
"style": {
"description": "CSS files to include in your application.",
"type": "array",
"items": {
"description": "CSS files to include in your application.",
"type": "string"
}
},
"script": {
"description": "JavaScript files to include in your application.",
"type": "array",
"items": {
"description": "JavaScript files to include in your application.",
"type": "string"
}
},
"dev": {
"description": "This is the same as `[web.resource]`, but it only works in development servers. For example, if you want to include a file in a dx serve server, but not a dx serve `--release` server, put it here.",
"type": "object",
"properties": {
"style": {
"description": "CSS files to include in your application. Dev-server only.",
"type": "array",
"items": {
"description": "CSS files to include in your application. Dev-server only.",
"type": "string"
}
},
"script": {
"description": "JavaScript files to include in your application. Dev-server only.",
"type": "array",
"items": {
"description": "JavaScript files to include in your application. Dev-server only.",
"type": "string"
}
}
}
}
}
},
"proxy": {
"description": "Configuration related to any proxies your application requires during development. Proxies will forward requests to a new service.",
"type": "array",
"items": {
"type": "object",
"properties": {
"backend": {
"description": "The URL to the server to proxy. The CLI will forward any requests under the backend relative route to the backend instead of returning 404",
"type": "string"
}
}
}
}
},
"required": ["app", "watcher", "resource"]
}
},
"required": ["application"]
}