This commit is contained in:
parent
52e6deaf9d
commit
f73222a1c9
1 changed files with 15 additions and 15 deletions
|
|
@ -15,21 +15,6 @@ var (
|
|||
entrypoints map[string]map[string]map[string][]string
|
||||
)
|
||||
|
||||
func Asset(name string) string {
|
||||
if manifest == nil {
|
||||
value, _ := statics.ReadFile("static/manifest.json")
|
||||
json.Unmarshal(value, &manifest)
|
||||
}
|
||||
|
||||
path, ok := manifest[name]
|
||||
|
||||
if !ok {
|
||||
return ""
|
||||
}
|
||||
|
||||
return path
|
||||
}
|
||||
|
||||
func entrypointFiles(app, category string) []string {
|
||||
if entrypoints == nil {
|
||||
value, _ := statics.ReadFile("static/entrypoints.json")
|
||||
|
|
@ -51,6 +36,21 @@ func entrypointFiles(app, category string) []string {
|
|||
return files
|
||||
}
|
||||
|
||||
func Asset(name string) string {
|
||||
if manifest == nil {
|
||||
value, _ := statics.ReadFile("static/manifest.json")
|
||||
json.Unmarshal(value, &manifest)
|
||||
}
|
||||
|
||||
path, ok := manifest[name]
|
||||
|
||||
if !ok {
|
||||
return ""
|
||||
}
|
||||
|
||||
return path
|
||||
}
|
||||
|
||||
func EntrypointJs(app string) []Node {
|
||||
files := entrypointFiles(app, "js")
|
||||
var results []Node
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue