-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathconfig.go
112 lines (98 loc) · 2.57 KB
/
config.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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
package cmd
import (
"github.com/volatiletech/abcweb/v5/config"
)
const (
basePackage = "github.com/volatiletech/abcweb/v5"
templatesDirectory = "templates"
migrationsDirectory = "db/migrations"
)
type buildConfig struct{}
type distConfig struct{}
type migrateConfig struct {
config.DBConfig
}
type newConfig struct {
AppPath string `toml:"app-path"`
TemplatePath string `toml:"template-path"`
ImportPath string `toml:"import-path"`
AppName string `toml:"app-name"`
AppEnvName string `toml:"app-env-name"`
TLSCommonName string `toml:"tls-common-name"`
ProdStorer string `toml:"prod-storer"`
DevStorer string `toml:"dev-storer"`
DefaultEnv string `toml:"default-env"`
Bootstrap string `toml:"bootstrap"`
NoBootstrapJS bool `toml:"no-bootstrap-js"`
NoGulp bool `toml:"no-gulp"`
NoFontAwesome bool `toml:"no-font-awesome"`
NoLiveReload bool `toml:"no-live-reload"`
NoTLSCerts bool `toml:"no-tls-certs"`
NoReadme bool `toml:"no-readme"`
NoConfig bool `toml:"no-config"`
NoSessions bool `toml:"no-sessions"`
ForceOverwrite bool `toml:"force-overwrite"`
SkipNPMInstall bool `toml:"skip-npm-install"`
SkipGitInit bool `toml:"skip-git-init"`
Silent bool `toml:"silent"`
Verbose bool `toml:"verbose"`
}
// Create some config variables
var (
migrateCmdConfig migrateConfig
)
// skipDirs are the directories to skip creating for new command
var skipDirs = []string{
// i18n is not implemented yet
"i18n",
}
// emptyDirs are the (potentially) empty directories that need to be created
// manually because empty directories cannot be committed to git
var emptyDirs = []string{
"assets/css",
"assets/fonts",
"assets/img",
"assets/js",
"assets/vendor/audio",
"assets/vendor/css",
"assets/vendor/fonts",
"assets/vendor/img",
"assets/vendor/js",
"assets/vendor/video",
"public/assets",
"db/migrations",
}
// Exclude the following files
var bootstrapNone = []string{
"bootstrap.scss",
"bootstrap-grid.scss",
"bootstrap-reboot.scss",
"_custom.scss",
"jquery-3.1.1.js",
"tether.js",
}
var bootstrapRegular = []string{
"bootstrap-grid.scss",
"bootstrap-reboot.scss",
}
var bootstrapGridOnly = []string{
"bootstrap-reboot.scss",
"bootstrap.scss",
"jquery-3.1.1.js",
"tether.js",
}
var bootstrapRebootOnly = []string{
"bootstrap-grid.scss",
"bootstrap.scss",
"jquery-3.1.1.js",
"tether.js",
}
var bootstrapGridRebootOnly = []string{
"bootstrap.scss",
"jquery-3.1.1.js",
"tether.js",
}
var bootstrapJSFiles = []string{
"jquery-3.1.1.js",
"tether.js",
}