Skip to content

Commit d0df36c

Browse files
docs: described setup script options, with new description (#158)
* docs: described setup script options, with new description * for/four typo * more docs
1 parent 95dac06 commit d0df36c

File tree

4 files changed

+27
-3
lines changed

4 files changed

+27
-3
lines changed

README.md

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<h1 align="center">Template TypeScript Node Package</h1>
22

3-
<p align="center">Template TypeScript Node.js package with all the CI bells & whistles I commonly use. ✨</p>
3+
<p align="center">A quickstart-friendly TypeScript package with lots of great repository tooling. ✨</p>
44

55
<p align="center">
66
<a href="#contributors" target="_blank">
@@ -64,6 +64,29 @@ To use this template:
6464

6565
> The setup script removes the `## Explainer` and `## Setup` from this README.md.
6666
67+
### Setup Options
68+
69+
The setup script requires four options to fill out repository details.
70+
It will interactively prompt for any that are not provided as a string CLI flag:
71+
72+
1. `repository`: The kebab-case name of the repository (e.g. `template-typescript-node-package`)
73+
2. `title`: Title Case title for the repository to be used in documentation (e.g. `Template TypeScript Node Package`)
74+
3. `owner`: GitHub organization or user the repository is underneath (e.g. `JoshuaKGoldberg`)
75+
4. `description`: Sentence case description of the repository (e.g. `A quickstart-friendly TypeScript package with lots of great repository tooling. ✨`)
76+
77+
Additionally, a `--skip-api` boolean CLI flag may be specified to prevent the setup script from calling to GitHub APIs for repository hydration.
78+
The script normally posts to GitHub APIs to set information such as repository description and branch protections on github.com.
79+
Specifying `--skip-api` prevents those API calls, effectively limiting setup changes to local files in Git.
80+
Doing so can be useful to preview what running setup does.
81+
82+
For example, pre-populating all values and skipping API calls:
83+
84+
```shell
85+
pnpm run setup --repository "testing-repository" --title "Testing Title" --owner "TestingOwner" --description "Test Description" --skip-api
86+
```
87+
88+
> Tip: after running `pnpm run setup` with `--skip-api`, you can always `git add -A; git reset --hard HEAD` to completely reset all changes.
89+
6790
## Usage
6891

6992
```shell

cspell.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
"conventionalcommits",
1818
"infile",
1919
"lcov",
20+
"quickstart",
2021
"wontfix"
2122
]
2223
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"author": "Josh Goldberg <[email protected]>",
3-
"description": "Template TypeScript Node.js package with all the CI bells & whistles I commonly use. ✨",
3+
"description": "A quickstart-friendly TypeScript package with lots of great repository tooling. ✨",
44
"devDependencies": {
55
"@typescript-eslint/eslint-plugin": "^5.38.1",
66
"@typescript-eslint/parser": "^5.38.1",

script/setup.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ try {
5656

5757
const title = await getPrefillOrPromptedValue(
5858
"title",
59-
"What will the Sentence Case title of the repository be?"
59+
"What will the Title Case title of the repository be?"
6060
);
6161

6262
const owner = await getPrefillOrPromptedValue(

0 commit comments

Comments
 (0)