mirror of
https://github.com/wailsapp/wails.git
synced 2025-05-04 06:09:56 +08:00
Create gitignore when using g option (#1430)
* Create gitignore when using g option
This commit is contained in:
parent
2a0673f99f
commit
f292e221f1
@ -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
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user