5
0
mirror of https://github.com/wailsapp/wails.git synced 2025-05-04 06:40:34 +08:00

Create gitignore when using g option (#1430)

* Create gitignore when using g option
This commit is contained in:
Jae-Sung Lee 2022-05-31 19:29:20 +09:00 committed by GitHub
parent 2a0673f99f
commit f292e221f1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -216,6 +216,16 @@ func initGit(options *templates.Options) error {
return errors.Wrap(err, "Unable to initialise git repository:")
}
ignore := []string{
"build/bin",
"frontend/dist",
"frontend/node_modules",
}
err = os.WriteFile(filepath.Join(options.TargetDir, ".gitignore"), []byte(strings.Join(ignore, "\n")), 0644)
if err != nil {
return errors.Wrap(err, "Unable to create gitignore")
}
return nil
}