You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now, if you npx create-typescript-app in an existing Git repository, you still get:
┌ Welcome to create-typescript-app ! 🎉
│
│ ⚠️ This template is early stage, opinionated, and not endorsed by the TypeScript team. ⚠️
│ ⚠️ If any tooling it sets displeases you, you can always remove that portion manually. ⚠️
│
◆ How would you like to use the template?
│ ○ create a new repository in a child directory
│ ○ initialize a freshly repository in the current directory
│ ● migrate an existing repository in the current directory
└
Seems a little silly. Can't the package figure out only the last one makes sense?
Prior to / as a part of #734, let's make that bit a bit cleaner. Maybe:
If already in a Git directory, assume migration mode
If in a blank directory, ask whether to create or initialize in the current directory
Otherwise (populated directory), ask to create or initialize in a named directory? (allowing either a new one or an existing child one)
Additional Info
No response
The text was updated successfully, but these errors were encountered:
## PR Checklist
- [x] Addresses an existing open issue: fixes#884
- [x] That issue was marked as [`status: accepting
prs`](https://github.com/JoshuaKGoldberg/create-typescript-app/issues?q=is%3Aopen+is%3Aissue+label%3A%22status%3A+accepting+prs%22)
- [x] Steps in
[CONTRIBUTING.md](https://github.com/JoshuaKGoldberg/create-typescript-app/blob/main/.github/CONTRIBUTING.md)
were taken
## Overview
Enhances `promptForMode` to give different options based on the current
directory:
* If it's empty, offer to `create` a new repository in it or a child
directory
* If it's a Git directory, offer to `initialize` or `migrate`
* If it's not a Git directory, runs `create` for a new repository in a
child directory
In doing so, adds an optional `--directory` that defaults to the
repository's name.
Also cleans up `getPrefillOrPromptedOption` a bit. Instead of allowing
an `existingValue` parameter, calls to `getPrefillOrPromptedOption` are
just put in the right-hand-side of a `??`.
Bug Report Checklist
main
branch of the repository.Overview
Right now, if you
npx create-typescript-app
in an existing Git repository, you still get:Seems a little silly. Can't the package figure out only the last one makes sense?
Prior to / as a part of #734, let's make that bit a bit cleaner. Maybe:
Additional Info
No response
The text was updated successfully, but these errors were encountered: