From 622f81f0c44133311eaac640f54a866cd1dfc591 Mon Sep 17 00:00:00 2001 From: Mark Bates Date: Fri, 12 Jan 2018 15:47:13 -0500 Subject: [PATCH] make sure to remove the public directory for API apps --- generators/newapp/new.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/generators/newapp/new.go b/generators/newapp/new.go index b518e5422..d0d4bd6c8 100644 --- a/generators/newapp/new.go +++ b/generators/newapp/new.go @@ -24,6 +24,7 @@ func (a Generator) Run(root string, data makr.Data) error { if a.AsAPI { defer os.RemoveAll(filepath.Join(a.Root, "templates")) defer os.RemoveAll(filepath.Join(a.Root, "locales")) + defer os.RemoveAll(filepath.Join(a.Root, "public")) } if a.Force { os.RemoveAll(a.Root) @@ -42,7 +43,7 @@ func (a Generator) Run(root string, data makr.Data) error { for _, f := range files { if a.AsAPI { - if strings.Contains(f.WritePath, "locales") || strings.Contains(f.WritePath, "templates") { + if strings.Contains(f.WritePath, "locales") || strings.Contains(f.WritePath, "templates") || strings.Contains(f.WritePath, "public") { continue } g.Add(makr.NewFile(f.WritePath, f.Body))