-
Notifications
You must be signed in to change notification settings - Fork 27
Fayde.json
The following is the basic structure for a fayde.json configuration file.
{
"libs": {
...
},
"themes": {
...
},
"debug": {
...
}
}
This area is used to configure the loading of libraries. The object is a key-value object where the key represents the library name and the value an object configuring the load. This configuration will directly affect how XAML is loaded.
<Application
xmlns:controls="lib://fayde.controls">
<controls:TabControl>
</controls:TabControl>
</Application>
"libs": {
"fayde.controls": {
"path": "lib/fayde.controls/dist/fayde.controls",
"base": "lib/fayde.controls",
"exports": "Fayde.Controls",
"deps": [],
}
}
path: string
- This is the app-relative path to the library. Fayde uses requirejs to asynchronously load libraries. NOTE: Typically, the .js
file extension is not specified.
base: string
- This is the app-relative path to the library's root directory. This is used for things like Library Resources.
exports: string
- If the library does not conform to AMD spec, this is a way to export the root module.
deps: string[]
- This is a way of specifying dependencies load before this library is loaded.
This area is used to configure loading of library themes in much the same way libraries are configured. A template path can be specified to modify how a theme is loaded or a theme can be turned off. There are reserved phrases that can be used in the template path to automate theme loading.
-
<libname>
- The library name is mainly used for the default template path, but can be used to make for consistent configuration files. -
<themename>
- The theme name is applied on an Application.
"themes": {
"fayde.controls": "none"
}
Default - lib/<libname>/themes/<themename>.Theme.xml
"themes": {
"fayde.controls": {}
}
"themes": {
"fayde.controls": {
"path": "lib/<libname>/themes/<themename>.Theme.xml"
}
}
-
warnMissingThemes
- Willconsole.warn
when a theme fails to load. -
warnBrokenPath
- Willconsole.warn
when a Binding.Path fails to resolve.