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
-[GitHub CLI](https://cli.github.com)_(you'll need to be logged in)_
34
+
-[Node.js](https://nodejs.org)
35
+
-[pnpm](https://pnpm.io)
36
+
37
+
This repository comes with two scripts to set up an existing or new repository with tooling.
38
+
Use the corresponding docs page to get started:
39
+
40
+
-[Initializing from the template](./docs/Initialization.md): creating a new repository with the [_Use this template_](https://github.com/JoshuaKGoldberg/template-typescript-node-package/generate) button on GitHub
41
+
-[Migrating an existing repository](./docs/Migration.md): adding this template's tooling on top of an existing repository
42
+
29
43
## Explainer
30
44
31
-
This template is available for anybody who wants to set up a basic Node application using TypeScript.
45
+
This template is available for anybody who wants to set up a Node application using TypeScript.
32
46
It sets up the following tooling for you:
33
47
34
48
-[**All Contributors**](https://allcontributors.org): Tracks various kinds of contributions and displays them in a nicely formatted table in the README.md.
@@ -44,112 +58,6 @@ It sets up the following tooling for you:
44
58
-[**TypeScript**](https://typescriptlang.org): A typed superset of JavaScript, configured with strict compiler options.
45
59
-[**Vitest**](https://vitest.dev): Fast unit tests, configured with coverage tracking and [console-fail-test](https://github.com/JoshuaKGoldberg/console-fail-test).
46
60
47
-
## Setup
48
-
49
-
This package comes with a bootstrap/initialization setup script that fills out your repository's details, installs necessary packages, then removes itself and uninstalls setup dependencies.
50
-
51
-
First make sure you have the following installed:
52
-
53
-
-[GitHub CLI](https://cli.github.com)_(you'll need to be logged in)_
54
-
-[Node.js](https://nodejs.org)
55
-
-[pnpm](https://pnpm.io)
56
-
57
-
To use this template:
58
-
59
-
1. Click the [_Use this template_](https://github.com/JoshuaKGoldberg/template-typescript-node-package/generate) button to create a new repository with the same Git history
60
-
2. Open that repository, such as by [cloning it locally](https://docs.github.com/en/repositories/creating-and-managing-repositories/cloning-a-repository) or [developing in a codespace](https://docs.github.com/en/codespaces/developing-in-codespaces/developing-in-a-codespace)
61
-
3. Create two tokens in [repository secrets](https://docs.github.com/en/actions/security-guides/encrypted-secrets):
62
-
-`ACCESS_TOKEN`: A [GitHub PAT](https://github.com/settings/tokens/new) with _repo_ and _workflow_ permissions
63
-
-`NPM_TOKEN`: An [npm access token](https://docs.npmjs.com/creating-and-viewing-access-tokens/) with _Automation_ permissions
64
-
4.`pnpm install`
65
-
5.`pnpm run setup` to run the setup script
66
-
6. Install the [Codecov GitHub App](https://github.com/marketplace/codecov) and [Renovate GitHub App](https://github.com/marketplace/renovate)
67
-
68
-
> The setup script removes the `## Explainer`, `## Setup`, and `## Repository Hydration` sections from this README.md.
69
-
70
-
### Setup Options
71
-
72
-
The setup script requires four options to fill out repository details.
73
-
It will interactively prompt for any that are not provided as a string CLI flag:
74
-
75
-
1.`repository`: The kebab-case name of the repository (e.g. `template-typescript-node-package`)
76
-
2.`title`: Title Case title for the repository to be used in documentation (e.g. `Template TypeScript Node Package`)
77
-
3.`owner`: GitHub organization or user the repository is underneath (e.g. `JoshuaKGoldberg`)
78
-
4.`description`: Sentence case description of the repository (e.g. `A quickstart-friendly TypeScript package with lots of great repository tooling. ✨`)
79
-
80
-
Additionally, a `--skip-api` boolean CLI flag may be specified to prevent the setup script from calling to GitHub APIs for repository hydration.
81
-
The script normally posts to GitHub APIs to set information such as repository description and branch protections on github.com.
82
-
Specifying `--skip-api` prevents those API calls, effectively limiting setup changes to local files in Git.
83
-
Doing so can be useful to preview what running setup does.
84
-
85
-
For example, pre-populating all values and skipping API calls:
> Tip: after running `pnpm run setup` with `--skip-api`, you can always `git add -A; git reset --hard HEAD` to completely reset all changes.
92
-
93
-
## Repository Hydration
94
-
95
-
> **Warning**
96
-
> Hydration will override many files in your repository.
97
-
> You'll want to review each of the changes and make sure nothing important is removed.
98
-
99
-
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.
100
-
101
-
```shell
102
-
npx template-typescript-node-package
103
-
```
104
-
105
-
Repository settings will be auto-filled from the repository's files if possible, but can be provided manually as well:
106
-
107
-
-`author`_(`string`)_: e.g. `"Josh Goldberg"`
108
-
-`description`_(`string`)_: e.g. `"A quickstart-friendly TypeScript template with comprehensive formatting, linting, releases, testing, and other great tooling built-in. ✨"`
## Can I use <insert tool here> with this template?
4
+
5
+
Yes!
6
+
After you set up a repository, you can substitute in any tools you'd like.
7
+
8
+
If you think the tool would be broadly useful to most consumers of this template, feel free to [file a feature request](https://github.com/JoshuaKGoldberg/template-typescript-node-package/issues/new?assignees=&labels=type%3A+feature&projects=&template=03-feature.yml&title=%F0%9F%9A%80+Feature%3A+%3Cshort+description+of+the+feature%3E) to add it in.
9
+
10
+
## Is there a way to pull in template updates to previously created repositories?
11
+
12
+
Not yet.
13
+
You can always copy & paste them in manually.
14
+
15
+
See [🚀 Feature: Add a script to sync the tooling updates from forked template repo #498](https://github.com/JoshuaKGoldberg/template-typescript-node-package/issues/498): it will likely eventually be possible.
16
+
17
+
## Why does this package include so many tools?
18
+
19
+
This repository is meant to serve as a starter that includes all the general tooling a modern TypeScript/Node repository could possibly need.
20
+
Each of the included tools exists for a good reason and provides real value.
21
+
22
+
If you don't want to use any particular tool, you can always remove it manually.
0 commit comments