pre-copilot

This commit is contained in:
nvms 2025-04-08 19:19:36 -04:00
parent d35e137872
commit 4041957a01
5 changed files with 14 additions and 4 deletions

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
.aider*
.env

1
NextChange.md Normal file
View File

@ -0,0 +1 @@
Fix --run with --watch - it does not watch correctly, and instead just exits.

Binary file not shown.

BIN
esr Executable file

Binary file not shown.

View File

@ -57,6 +57,13 @@ func (b *Builder) Build(buildOptions *api.BuildOptions) error {
b.BuiltCSS = append(b.BuiltCSS, file.Path)
}
} else {
dir := filepath.Dir(file.Path)
if _, err := os.Stat(dir); os.IsNotExist(err) {
if err := os.MkdirAll(dir, os.ModePerm); err != nil {
return fmt.Errorf("esr :: failed to create directory: %v", err)
}
}
if err := os.WriteFile(file.Path, file.Contents, os.ModePerm); err != nil {
return fmt.Errorf("esr :: failed to write file: %v", err)
}