|
|
|
@ -46,6 +46,7 @@ func main() { |
|
|
|
|
|
|
|
|
|
|
|
feature_dir := filepath.Join("features", config.Name) |
|
|
|
feature_dir := filepath.Join("features", config.Name) |
|
|
|
view_dir := filepath.Join("views", config.Name) |
|
|
|
view_dir := filepath.Join("views", config.Name) |
|
|
|
|
|
|
|
tests_dir := filepath.Join("tests", config.Name) |
|
|
|
|
|
|
|
|
|
|
|
err := os.MkdirAll(feature_dir, 0755) |
|
|
|
err := os.MkdirAll(feature_dir, 0755) |
|
|
|
if err != nil { panic(err) } |
|
|
|
if err != nil { panic(err) } |
|
|
|
@ -53,6 +54,9 @@ func main() { |
|
|
|
err = os.MkdirAll(view_dir, 0755) |
|
|
|
err = os.MkdirAll(view_dir, 0755) |
|
|
|
if err != nil { panic(err) } |
|
|
|
if err != nil { panic(err) } |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
err = os.MkdirAll(tests_dir, 0755) |
|
|
|
|
|
|
|
if err != nil { panic(err) } |
|
|
|
|
|
|
|
|
|
|
|
err = fs.WalkDir(templates, "templates", |
|
|
|
err = fs.WalkDir(templates, "templates", |
|
|
|
func(path string, d fs.DirEntry, err error) error { |
|
|
|
func(path string, d fs.DirEntry, err error) error { |
|
|
|
if err != nil { return err } |
|
|
|
if err != nil { return err } |
|
|
|
@ -68,6 +72,10 @@ func main() { |
|
|
|
out_path := filepath.Join("features", config.Name, target) |
|
|
|
out_path := filepath.Join("features", config.Name, target) |
|
|
|
err := WriteTemplate(config, path, out_path)
|
|
|
|
err := WriteTemplate(config, path, out_path)
|
|
|
|
if err != nil { panic(err) } |
|
|
|
if err != nil { panic(err) } |
|
|
|
|
|
|
|
case strings.HasPrefix(path, "templates/tests"): |
|
|
|
|
|
|
|
out_path := filepath.Join("tests", config.Name, target) |
|
|
|
|
|
|
|
err := WriteTemplate(config, path, out_path)
|
|
|
|
|
|
|
|
if err != nil { panic(err) } |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|