Macro perseus::define_app [−][src]
macro_rules! define_app {
{
$(root : $root_selector : literal,) ? templates :
[$($template : expr), +], error_pages : $error_pages : expr, locales :
{
default : $default_locale : literal, other :
[$($other_locale : literal), *]
} $(, static_aliases : { $($url : literal => $resource : literal) * }) ?
$(, dist_path : $dist_path : literal) ?
$(, mutable_store : $mutable_store : expr) ?
$(, translations_manager : $translations_manager : expr) ?
} => { ... };
{
$(root : $root_selector : literal,) ? templates :
[$($template : expr), +], error_pages : $error_pages : expr
$(, static_aliases : { $($url : literal => $resource : literal) * }) ?
$(, dist_path : $dist_path : literal) ?
$(, mutable_store : $mutable_store : expr) ?
} => { ... };
(@ define_app,
{
$(root : $root_selector : literal,) ? templates :
[$($template : expr), +], error_pages : $error_pages : expr, locales :
{
default : $default_locale : literal, other :
[$($other_locale : literal), *] $(, no_i18n : $no_i18n : literal) ?
} $(, static_aliases : { $($url : literal => $resource : literal) * }) ?
$(, dist_path : $dist_path : literal) ?
$(, mutable_store : $mutable_store : expr) ?
$(, translations_manager : $translations_manager : expr) ?
}) => { ... };
}
Expand description
Defines the components to create an entrypoint for the app. The actual entrypoint is created in the .perseus/
crate (where we can
get all the dependencies without driving the user’s Cargo.toml
nuts). This also defines the template map. This is intended to make
compatibility with the Perseus CLI significantly easier.
Warning: all properties must currently be in the correct order (root
, templates
, error_pages
, locales
, static_aliases
,
dist_path
, mutable_store
, translations_manager
).