forked from hashicorp/otto
/
meta.go
37 lines (31 loc) · 815 Bytes
/
meta.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
package scriptpackapp
import (
"github.com/hashicorp/otto/app"
"github.com/hashicorp/otto/appfile/detect"
)
// Meta is the metadata for this app type
var Meta = &app.Meta{
Tuples: Tuples,
Detectors: Detectors,
}
// Tuples is the list of tuples that this built-in app implementation knows
// that it can support.
var Tuples = app.TupleSlice([]app.Tuple{
{"scriptpack", "*", "*"},
})
// Detectors is the list of detectors that trigger this app to be used.
var Detectors = []*detect.Detector{
&detect.Detector{
Type: "scriptpack",
Contents: map[string]string{
"main.go": `^var ScriptPack =`,
},
// High priority for ScriptPacks since it is a very specific
// dev environment type.
Priority: 10,
},
}
// AppFactory is the factory for this app
func AppFactory() app.App {
return &App{}
}