1
0
mirror of https://github.com/matrix-org/matrix-authentication-service.git synced 2025-08-06 06:02:40 +03:00

Do not embed the templates and static files in the binary

This commit is contained in:
Quentin Gliech
2022-11-18 21:03:04 +01:00
parent 834214bcac
commit 9c0ece7512
51 changed files with 150 additions and 3518 deletions

View File

@@ -49,28 +49,7 @@ macro_rules! register_templates {
)*
} => {
/// List of registered templates
static TEMPLATES: [(&'static str, Option<&'static str>); count!( $( $template )* )] = [
$( (
$template,
if cfg!(feature = "dev") {
None
} else {
Some(include_str!(concat!("res/", $template)))
}
) ),*
];
/// List of extra templates used by other templates
static EXTRA_TEMPLATES: [(&'static str, Option<&'static str>); count!( $( $( $extra_template )* )? )] = [
$( $( (
$extra_template,
if cfg!(feature = "dev") {
None
} else {
Some(include_str!(concat!("res/", $extra_template)))
}
) ),* )?
];
static TEMPLATES: [&'static str; count!( $( $template )* )] = [ $( $template, )* ];
impl Templates {
$(