Dev mode does not need make assets any more
- Only when using the buildflag `-tags dev` local file - files are loaded directly from the file system instead of the compiled binary - had to move `//go:generate esc …` from `server/http.go`to `main.go` as otherwise the stored local paths of the files wouldn’t be correct - Moved the `liveAssets` constants definition into two separate files, where one is included when building for dev, and one when it isn’t - move the tempate parsing into the handler in `http.go` as otherwise template changes would not be considered
This commit is contained in:
parent
caffcfda59
commit
edd833db82
5 changed files with 78 additions and 68 deletions
2
main.go
2
main.go
|
|
@ -1,5 +1,7 @@
|
|||
package main
|
||||
|
||||
//go:generate esc -o server/assets.go -pkg server -modtime 1566640112 -ignore .DS_Store -prefix assets assets
|
||||
|
||||
import (
|
||||
"github.com/andig/evcc/cmd"
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue