Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(crwa): Add git init option #6824

Conversation

redwoodjs-bot[bot]
Copy link

@redwoodjs-bot redwoodjs-bot bot commented Nov 8, 2022

Hi All,

Related to: #3989

This PR does the following:

  • Adds --git and --git-init args to the cli installer, --git is just an alias for --git-init. By default this also enables --no-git and --no-git-init
  • Adds prompt for whether the user wants to init a new git repo
  • Adds ListR task for initializing a new git repo using the following command git init && git add . && git commit -m "Initial commit" && git branch -M main
  • Adds onCancel: () => process.exit(1) to both the code language prompt and git init prompt so there is a cleaner cancel if the user exits the process during the prompts
  • Adds an error for when the user selects JavaScript but disables yarn install which won't work

The biggest question I had was which prompt style I should actually use. It could be a toggle, confirm or select. I actually prefer the visual layout of the select prompt even though logically it is really more of a toggle prompt. Either way the code can be easily modified to use the preferred prompt style.

Prompt examples:

* Initial wip

* Wording improvements

* Add command to CLI docs

* Wording update

* Switch to toggle

* Error message for javascript and --no-yarn-install

* Make suggested changes

* Remove word new from docs to stay consistent

* Fix failing test
@redwoodjs-bot redwoodjs-bot bot added cherry-pick release:feature This PR introduces a new feature labels Nov 8, 2022
@redwoodjs-bot redwoodjs-bot bot closed this Nov 8, 2022
@jtoar jtoar deleted the cherry-pick-next-1354090a940de2387ec8d87c4bd48c5c437078c7 branch December 8, 2022 21:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release:feature This PR introduces a new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant