Skip to content

Commit

Permalink
chore: bring in updates for create's interactive CLI (#1781)
Browse files Browse the repository at this point in the history
## PR Checklist

- [x] Addresses an existing open issue: fixes #1780
- [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

Applies three main areas of change:

* Factors in a `directory` string for option defaults so they can work
outside of the cwd
* Adds a fallback of `gh config get user -h github.com` for
`options.owner`, finally removing the need to manually re-type your own
owner always 🥳
* Adds `.describe("...")` to their Zod schemas so they can be nicely
described in prompts (and, eventually, auto-generated docs)
* Brings in the new `suggestions` Indirect Creations to generate the
nice _"be sure to..."_ notice upon completion

Also removes the `--offline` from `finalizeDependencies`.

💖
  • Loading branch information
JoshuaKGoldberg authored Dec 24, 2024
1 parent cc7ac99 commit 3b082a9
Show file tree
Hide file tree
Showing 26 changed files with 612 additions and 218 deletions.
8 changes: 4 additions & 4 deletions docs/Options.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ These required options determine the options that will be substituted into the t
- `--description` _(`string`)_: Sentence case description of the repository (e.g. `Quickstart-friendly TypeScript package with lots of great repository tooling. ✨`)
- `--owner` _(`string`)_: GitHub organization or user the repository is underneath (e.g. `JoshuaKGoldberg`)
- `--repository` _(`string`)_: The kebab-case name of the repository (e.g. `create-typescript-app`)
- `--title` _(`string`)_: Title Case title for the repository to be used in documentation (e.g. `Create TypeScript App`)
- `--title` _(`string`)_: Title Case title for the repository (e.g. `Create TypeScript App`)

For example, pre-populating all core required options and also creating a new repository:

Expand All @@ -53,16 +53,16 @@ The setup scripts also allow for optional overrides of the following inputs whos

- `--access` _(`"public" | "restricted"`)_: Which [`npm publish --access`](https://docs.npmjs.com/cli/commands/npm-publish#access) to release npm packages with (by default, `"public"`)
- `--author` _(`string`)_: Username on npm to publish packages under (by default, an existing npm author, or the currently logged in npm user, or `owner.toLowerCase()`)
- `--bin` _(`string`)_: value to set in `package.json`'s `"bin"` property, per [FAQs > How can I use `bin`?](./FAQs.md#how-can-i-use-bin)
- `--bin` _(`string`)_: Value to set in `package.json`'s `"bin"` property, per [FAQs > How can I use `bin`?](./FAQs.md#how-can-i-use-bin)
- `--directory` _(`string`)_: Directory to create the repository in (by default, the same name as the repository)
- `--email` _(`string`)_: Email address to be listed as the point of contact in docs and packages (e.g. `[email protected]`)
- Optionally, `--email-github` _(`string`)_ and/or `--email-npm` _(`string`)_ may be provided to use different emails in `.md` files and `package.json`, respectively
- `--funding` _(`string`)_: GitHub organization or username to mention in `funding.yml` (by default, `owner`)
- `--guide` _(`string`)_: Link to a contribution guide to place at the top of the development docs
- `--guide` _(`string`)_: Link to a contribution guide to place at the top of development docs
- `--guide-title` _(`string`)_: If `--guide` is provided or detected from an existing DEVELOPMENT.md, the text title to place in the guide link
- `--keywords` _(`string[]`)_: Any number of keywords to include in `package.json` (by default, none)
- This can be specified any number of times, like `--keywords apple --keywords "banana cherry"`
- `--logo` _(`string`)_: Local image file in the repository to display near the top of the README.md as a logo
- `--logo` _(`string`)_: Local image file in the repository to display near the top of the README.md
- `--logo-alt` _(`string`)_: If `--logo` is provided or detected from an existing README.md, alt text that describes the image (will be prompted for if not provided)
- `--preserve-generated-from` _(`boolean`)_: Whether to keep the GitHub repository _generated from_ notice (by default, `false`)

Expand Down
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,14 @@
"@clack/prompts": "^0.9.0",
"@prettier/sync": "^0.5.2",
"chalk": "^5.4.1",
"create": "0.1.0-alpha.7",
"create": "0.1.0-alpha.8",
"cspell-populate-words": "^0.3.0",
"execa": "^9.5.2",
"git-remote-origin-url": "^4.0.0",
"git-url-parse": "^16.0.0",
"input-from-file": "0.1.0-alpha.2",
"input-from-file-json": "0.1.0-alpha.2",
"input-from-file": "0.1.0-alpha.4",
"input-from-file-json": "0.1.0-alpha.4",
"input-from-script": "0.1.0-alpha.4",
"js-yaml": "^4.1.0",
"lazy-value": "^3.0.0",
"npm-user": "^6.1.1",
Expand Down Expand Up @@ -84,7 +85,7 @@
"all-contributors-cli": "6.26.1",
"c8": "10.1.3",
"console-fail-test": "0.5.0",
"create-testers": "0.1.0-alpha.7",
"create-testers": "0.1.0-alpha.8",
"cspell": "8.17.1",
"eslint": "9.17.0",
"eslint-plugin-jsdoc": "50.6.1",
Expand Down
Loading

0 comments on commit 3b082a9

Please sign in to comment.