diff --git a/main.go b/main.go index ea9c96a..ba4ee96 100644 --- a/main.go +++ b/main.go @@ -177,7 +177,8 @@ func createProject(cmd *cobra.Command, args []string) { // Create the same structure in the target directory relPath, _ := filepath.Rel("templates/wesionary/project", path) targetPath := filepath.Join(targetRoot, filepath.Dir(relPath)) - dst := filepath.Join(targetPath, filepath.Base(path)) + fileName := filepath.Base(path) + dst := filepath.Join(targetPath, fileName) os.MkdirAll(targetPath, os.ModePerm) // Handle template files @@ -191,6 +192,9 @@ func createProject(cmd *cobra.Command, args []string) { dst = strings.Replace(dst, ".mod", "", 1) generateFromEmbeddedTemplate(path, dst, data) } else { + if strings.HasPrefix(fileName, "hidden.") { + dst = strings.Replace(dst, "hidden.", ".", 1) + } // just copy the files to the target directory if err := copyFile(path, dst); err != nil { panic(err) diff --git a/templates/wesionary/project/.editorconfig b/templates/wesionary/project/hidden.editorconfig similarity index 100% rename from templates/wesionary/project/.editorconfig rename to templates/wesionary/project/hidden.editorconfig diff --git a/templates/wesionary/project/.env.example b/templates/wesionary/project/hidden.env.example similarity index 100% rename from templates/wesionary/project/.env.example rename to templates/wesionary/project/hidden.env.example diff --git a/templates/wesionary/project/.gitignore b/templates/wesionary/project/hidden.gitignore similarity index 100% rename from templates/wesionary/project/.gitignore rename to templates/wesionary/project/hidden.gitignore diff --git a/templates/wesionary/project/.golangci.yml b/templates/wesionary/project/hidden.golangci.yml similarity index 100% rename from templates/wesionary/project/.golangci.yml rename to templates/wesionary/project/hidden.golangci.yml