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
Now that npx template-typescript-node-package is a supported -even recommended- use case, folks will want to be able to run npx template-typescript-node-package --help. Let's have it print out, for each of the available CLI options, what they do. Also the package version
Vaguely:
npx template-typescript-node-package --help
✨ template-typescript-node-package v1.2.3 ✨
A quickstart-friendly TypeScript template with comprehensive formatting, linting, releases, testing, and other great tooling built-in.
--base: Whether to scaffold the repository with:
- `everything` that comes with the template _(recommended)_
- `minimum` amounts of tooling, essentially opting out of everything
- `prompt`for which portions to exclude
--create-repository: Whether to create a corresponding repository on github.com (if it doesn't yet exist)...👉 See https://github.com/JoshuaKGoldberg/template-typescript-node-package for more documentation.
<!-- 👋 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#703
- [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.
-->
I've added functionality to print to the terminal help documentation
based on the existing docs when the `--help` or `-h` terminal flags are
used.
This will run in place of the functionality.
I've marked this as a draft PR as I have a few questions so it is not
yet complete, maybe you can assist @JoshuaKGoldberg :
- What kind of test coverage would you be looking for for this
functionality?
- What is the best approach to fetch the version number?
- I'm not clear what is meant by "running `parseargs`" to check for
missing options (from the issue).
Beyond that, is what I've included and how I've formatted the printout
what you were expecting?
---------
Co-authored-by: Josh Goldberg ✨ <[email protected]>
Bug Report Checklist
main
branch of the repository.Overview
Now that
npx template-typescript-node-package
is a supported -even recommended- use case, folks will want to be able to runnpx template-typescript-node-package --help
. Let's have it print out, for each of the available CLI options, what they do. Also the package versionVaguely:
Additional Info
See https://github.com/JoshuaKGoldberg/template-typescript-node-package/blob/77c10eb9d8dd384ae8e6417d26b92211185b6487/docs/Options.md for descriptions of existing CLI flags. You can directly copy & paste from there.
I'd also suggest running
parseArgs
to make sure Options.md isn't missing any options (it's entirely possible I forgot about one...).Arguments are first parsed here: https://github.com/JoshuaKGoldberg/template-typescript-node-package/blob/0307eba66fe59c3a89a189352fd4797aad37736f/src/bin/index.ts#L34-L40
I think you'll want to add a
--help
arg there with a-h
shorthand. See https://nodejs.org/api/util.html#utilparseargsconfig for examples ofshort
.The text was updated successfully, but these errors were encountered: