dnscontrol/build/generate/generate.go
Tom Limoncelli 92b51dbc65
Update github.com/mjibson/esc (#515)
* Update github.com/mjibson/esc

* Update github.com/mjibson/esc
* Fix generate.go to new signature for esc.Run

* Internal: Upgrade to lastest "esc"
2020-01-29 13:43:25 -05:00

34 lines
534 B
Go

package main
import (
"log"
"os"
"github.com/mjibson/esc/embed"
)
func main() {
conf := &embed.Config{
ModTime: "0",
OutputFile: "pkg/js/static.go",
Package: "js",
Prefix: "pkg/js",
Private: true,
Files: []string{`pkg/js/helpers.js`},
}
var err error
out := os.Stdout
if conf.OutputFile != "" {
if out, err = os.Create(conf.OutputFile); err != nil {
log.Fatal(err)
}
defer out.Close()
}
embed.Run(conf, out)
if err := generateFeatureMatrix(); err != nil {
log.Fatal(err)
}
}