Add template fallback file

This commit is contained in:
Matej Bačo 2024-11-21 21:43:06 +01:00
parent 40e343d17d
commit 18d9ebaab3
4 changed files with 22 additions and 3 deletions

View file

@ -27,7 +27,8 @@ return [
getFramework('SVELTEKIT', [
'serveRuntime' => 'static-1',
'installCommand' => 'npm install --force',
'providerRootDirectory' => './'
'providerRootDirectory' => './',
'fallbackFile' => null
])
],
'vcsProvider' => 'github',

View file

@ -37652,6 +37652,11 @@
"type": "string",
"description": "Runtime used during build step of template.",
"x-example": "node-22"
},
"fallbackFile": {
"type": "string",
"description": "Fallback file for SPA. Only relevant for static serve runtime.",
"x-example": "index.html"
}
},
"required": [
@ -37662,7 +37667,8 @@
"outputDirectory",
"providerRootDirectory",
"serveRuntime",
"buildRuntime"
"buildRuntime",
"fallbackFile"
]
},
"function": {

View file

@ -38208,6 +38208,11 @@
"type": "string",
"description": "Runtime used during build step of template.",
"x-example": "node-22"
},
"fallbackFile": {
"type": "string",
"description": "Fallback file for SPA. Only relevant for static serve runtime.",
"x-example": "index.html"
}
},
"required": [
@ -38218,7 +38223,8 @@
"outputDirectory",
"providerRootDirectory",
"serveRuntime",
"buildRuntime"
"buildRuntime",
"fallbackFile"
]
},
"function": {

View file

@ -58,6 +58,12 @@ class TemplateFramework extends Model
'default' => '',
'example' => 'node-22',
])
->addRule('fallbackFile', [
'type' => self::TYPE_STRING,
'description' => 'Fallback file for SPA. Only relevant for static serve runtime.',
'default' => null,
'example' => 'index.html',
])
;
}