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
feat: add hydration script for existing repos (#441)
## PR Checklist
- [x] Addresses an existing open issue: fixes#374
- [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
Adds the script as a `bin` command you can run with `npx
template-typescript-node-package`. Which bumps up a few dependencies
from `devDependency` to `dependency`.
This has the nice side effect of standardizing formatting for an
assortment of files. Hence the large _Files changed_ count outside of
the new `src/hydrate/` directory.
Things I've intentionally not done here, so they can be filed as
followup issues:
* Filling in unit test coverage
* Running
[`all-contributors-for-repository`](https://github.com/JoshuaKGoldberg/all-contributors-for-repository)
to fill in the `.all-contributorsrc`
* Removing existing image badges from the README.md
* Removing existing `CODE_OF_CONDUCT.md`
* Use the GitHub API to set up labels and other repo settings
* Run `pnpm run lint --fix`
* CLI flag for hydration to just refresh files locally
* Getting hydration to the point where it doesn't make changes in this
repo _(is that possible?)_
* A copy&pastable script to run in a repo to update it to the latest
tooling (migrations?!)
> Tip: after running `pnpm run setup` with `--skip-api`, you can always `git add -A; git reset --hard HEAD` to completely reset all changes.
91
91
92
+
## Repository Hydration
93
+
94
+
Alternately, if you have an existing repository that you'd like to give the files from this repository, you can run `template-typescript-node-package` in a repository to "hydrate" it.
95
+
96
+
```shell
97
+
npx template-typescript-node-package
98
+
```
99
+
100
+
Repository settings will be auto-filled from the repository's files if possible, but can be provided manually as well:
101
+
102
+
-`author`_(`string`)_: e.g. `"Josh Goldberg"`
103
+
-`description`_(`string`)_: e.g. `"A quickstart-friendly TypeScript template with comprehensive formatting, linting, releases, testing, and other great tooling built-in. ✨"`
0 commit comments