mirror of
https://github.com/wailsapp/wails.git
synced 2025-05-02 16:02:07 +08:00
Feature: Don't generate models.ts
if there are no models.
This commit is contained in:
parent
f192cbd01b
commit
eb97f53124
@ -109,6 +109,11 @@ func (b *Bindings) WriteModels(modelsDir string) error {
|
||||
modelsData.WriteString("\n}\n\n")
|
||||
}
|
||||
|
||||
// Don't write if we don't have anything
|
||||
if len(modelsData.Bytes()) == 0 {
|
||||
return nil
|
||||
}
|
||||
|
||||
filename := filepath.Join(modelsDir, "models.ts")
|
||||
err := os.WriteFile(filename, modelsData.Bytes(), 0755)
|
||||
if err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user