Skip to content
This repository has been archived by the owner on Feb 24, 2024. It is now read-only.

Commit

Permalink
make sure to remove the public directory for API apps
Browse files Browse the repository at this point in the history
  • Loading branch information
markbates committed Jan 12, 2018
1 parent 3a883a3 commit 622f81f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion generators/newapp/new.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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))
Expand Down

0 comments on commit 622f81f

Please sign in to comment.