Skip to content

Commit

Permalink
✨ Add git initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
CryogenicPlanet committed Dec 12, 2021
1 parent 054aa46 commit b49456e
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions internal/commands/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,15 @@ func setupTailwind(dirName string, libraryMode bool) {
setupWg.Done()
}

func gitInit(path string) error {

utils.ExecWithOutput(path, "git", "init")
utils.ExecWithOutput(path, "git", "add", ".")
utils.ExecWithOutput(path, "git", "commit", "-m", "Tsdev setup")

return nil
}

// Will install the packages
func installPackages(path string) {

Expand Down Expand Up @@ -289,5 +298,7 @@ func HandleCreateCommand(name string) error {

setupWg.Wait()

gitInit(dirPath(name))

return nil
}

0 comments on commit b49456e

Please sign in to comment.