Skip to content

Commit

Permalink
feat(plugin): delete \n when no plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
LinkinStars committed Oct 18, 2023
1 parent 929f674 commit e8c7e75
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion internal/cli/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,11 @@ func getFolders(dir string) ([]string, error) {

func generateIndexTsContent(folders []string) string {
builder := &strings.Builder{}
builder.WriteString("export default null;\n\n")
builder.WriteString("export default null;\n")
// Line 2:1: Delete `⏎` prettier/prettier
if len(folders) > 0 {
builder.WriteString("\n")
}
for _, folder := range folders {
builder.WriteString(fmt.Sprintf("export { default as %s } from '%s';\n", folder, folder))
}
Expand Down

0 comments on commit e8c7e75

Please sign in to comment.