Skip to content

Commit 3d86ada

Browse files
docs: clarify the purpose of --bin (#1683)
<!-- 👋 Hi, thanks for sending a PR to create-typescript-app! 💖. 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 #1677 - [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 <!-- Description of what is changed and how the code change does that. --> Clarify what `bin` does and does not do. --------- Co-authored-by: Josh Goldberg ✨ <[email protected]>
1 parent e7fafcb commit 3d86ada

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

docs/FAQs.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,3 +218,11 @@ If you know of any accessibility organization that's published more formal recom
218218
You can adjust the tab size that GitHub uses to display files from your [account settings page](https://github.com/settings/appearance#tab-size-heading) (the default is 8 spaces).
219219

220220
If you really want spaces in your project you can always remove the `"useTabs": true`.
221+
222+
## How can I use `bin`?
223+
224+
The `--bin` option allows you to create a `package.json` bin value to include for npx-style running.
225+
An example of this would be `"./bin/index.js"`.
226+
You'll need to create the folders and files that `bin` references.
227+
228+
If you'd like an example of what that looks like, take a look at the [CTA source code](https://github.com/JoshuaKGoldberg/create-typescript-app/blob/e7fafcb8968f8f6c551ab0917c9a6a849a3cba28/bin/index.js)!

docs/Options.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ The setup scripts also allow for optional overrides of the following inputs whos
5353

5454
- `--access` _(`"public" | "restricted"`)_: Which [`npm publish --access`](https://docs.npmjs.com/cli/commands/npm-publish#access) to release npm packages with (by default, `"public"`)
5555
- `--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()`)
56-
- `--bin` _(`string`)_: `package.json` bin value to include for npx-style running.
56+
- `--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)
5757
- `--directory` _(`string`)_: Directory to create the repository in (by default, the same name as the repository)
5858
- `--email` _(`string`)_: Email address to be listed as the point of contact in docs and packages (e.g. `[email protected]`)
5959
- Optionally, `--email-github` _(`string`)_ and/or `--email-npm` _(`string`)_ may be provided to use different emails in `.md` files and `package.json`, respectively

0 commit comments

Comments
 (0)