Restore local live reloading of templates.

This commit is contained in:
mikestefanello 2023-12-12 20:07:58 -05:00
parent 29fbadbadd
commit 5f877c3d38
5 changed files with 63 additions and 21 deletions

View file

@ -99,7 +99,7 @@ func TestController_RenderPage(t *testing.T) {
expectedTemplates := make(map[string]bool)
expectedTemplates[p.Name+config.TemplateExt] = true
expectedTemplates[p.Layout+config.TemplateExt] = true
components, err := templates.Templates.ReadDir("components")
components, err := templates.Get().ReadDir("components")
require.NoError(t, err)
for _, f := range components {
expectedTemplates[f.Name()] = true
@ -132,7 +132,7 @@ func TestController_RenderPage(t *testing.T) {
expectedTemplates := make(map[string]bool)
expectedTemplates[p.Name+config.TemplateExt] = true
expectedTemplates["htmx"+config.TemplateExt] = true
components, err := templates.Templates.ReadDir("components")
components, err := templates.Get().ReadDir("components")
require.NoError(t, err)
for _, f := range components {
expectedTemplates[f.Name()] = true