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

🚀 Feature: Be able to initialize a new repository on the CLI (like create-* apps) #670

Closed
3 tasks done
JoshuaKGoldberg opened this issue Aug 21, 2023 · 1 comment · Fixed by #681
Closed
3 tasks done
Assignees
Labels
status: accepting prs Please, send a pull request to resolve this! type: feature New enhancement or request

Comments

@JoshuaKGoldberg
Copy link
Owner

Bug Report Checklist

  • I have tried restarting my IDE and the issue persists.
  • I have pulled the latest main branch of the repository.
  • I have searched for related issues and found none that matched my issue.

Overview

Splitting out of #613: right now there are two ways to run this template:

It'd be convenient for folks to run npx template-typescript-node-app the CLI also. It should be able to detect whether the current directory is a Git repo, and offer to create a new repo if so.

After this change goes in, the template will be ready to be renamed to create-typescript-app.

Additional Info

Blocked on #669.

@JoshuaKGoldberg JoshuaKGoldberg added type: feature New enhancement or request status: accepting prs Please, send a pull request to resolve this! labels Aug 21, 2023
@JoshuaKGoldberg JoshuaKGoldberg self-assigned this Aug 21, 2023
@JoshuaKGoldberg JoshuaKGoldberg added status: blocked Waiting for something else to be resolved and removed status: accepting prs Please, send a pull request to resolve this! labels Aug 21, 2023
@JoshuaKGoldberg JoshuaKGoldberg added status: accepting prs Please, send a pull request to resolve this! and removed status: blocked Waiting for something else to be resolved labels Aug 22, 2023
@JoshuaKGoldberg JoshuaKGoldberg added this to the Ready to Launch milestone Aug 22, 2023
JoshuaKGoldberg added a commit that referenced this issue Aug 22, 2023
<!-- 👋 Hi, thanks for sending a PR to template-typescript-node-package!
💖.
Please fill out all fields below and make sure each item is true and [x]
checked.
Otherwise we may not be able to review your PR. -->

## PR Checklist

- [x] Addresses an existing open issue: fixes #670 
- [x] That issue was marked as [`status: accepting
prs`](https://github.com/JoshuaKGoldberg/template-typescript-node-package/issues?q=is%3Aopen+is%3Aissue+label%3A%22status%3A+accepting+prs%22)
- [x] Steps in
[CONTRIBUTING.md](https://github.com/JoshuaKGoldberg/template-typescript-node-package/blob/main/.github/CONTRIBUTING.md)
were taken

## Overview

Changes the bin script to be the main launching point for the app. It
can take in or prompt for a `--mode` set to either `"create"`,
`"initialize"`, or `"migrate"`.

This comes with a few cleanups:

* Simplified `runOrRestore` so that it just runs or logs - leaving
parsing logic to the functions that call it
* Removed a lot of the terminal logs so that the remaining output is
cleaner
* Cleaned up input parsing to have fewer different code paths / types

Tracking my todo items:

- [x] Add a new `create` flow alongside `initialize` and `migrate`
- [x] Manually test a bunch
- [x] Refactor their code to streamline the flow of logic
- [x] Fix unit tests
- [x] Fix existing end-to-end tests
- [x] Overhaul documentation
- [x] Add a new end-to-end test
- [x] Manually test some more
@github-actions
Copy link

🎉 This is included in version v1.29.1 🎉

The release is available on:

Cheers! 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: accepting prs Please, send a pull request to resolve this! type: feature New enhancement or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant