mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2025-01-11 09:59:59 +08:00
92b51dbc65
* Update github.com/mjibson/esc * Update github.com/mjibson/esc * Fix generate.go to new signature for esc.Run * Internal: Upgrade to lastest "esc"
34 lines
534 B
Go
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)
|
|
}
|
|
}
|