Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃殌 Feature: Add a --version CLI option #704

Closed
3 tasks done
JoshuaKGoldberg opened this issue Aug 25, 2023 · 1 comment 路 Fixed by #1063
Closed
3 tasks done

馃殌 Feature: Add a --version CLI option #704

JoshuaKGoldberg opened this issue Aug 25, 2023 · 1 comment 路 Fixed by #1063
Labels
good first issue Good for newcomers, please hop on! status: accepting prs Please, send a pull request to resolve this! type: feature New enhancement or request

Comments

@JoshuaKGoldberg
Copy link
Owner

JoshuaKGoldberg commented Aug 25, 2023

Bug Report Checklist

  • I have tried restarting my IDE and the issue persists.
  • I have pulled the latest main branch of the repository.
  • I have searched for related issues and found none that matched my issue.

Overview

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 --version. Let's have it print out the package version.

Vaguely:

npx template-typescript-node-package --version
1.2.3

Additional Info

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 --version arg there with a -v shorthand. See https://nodejs.org/api/util.html#utilparseargsconfig for examples of short.

@JoshuaKGoldberg JoshuaKGoldberg added good first issue Good for newcomers, please hop on! type: feature New enhancement or request status: accepting prs Please, send a pull request to resolve this! labels Aug 25, 2023
JoshuaKGoldberg pushed a commit that referenced this issue Dec 1, 2023
<!-- 馃憢 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 #704
- [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 was browsing the list of issues labeled `good first issue` and saw
that issue #704 had its attached PR closed. The version feature has
basically already been implemented, but this just adds the flag to
display the version.

馃Б
Copy link

github-actions bot commented Dec 1, 2023

馃帀 This is included in version v1.49.0 馃帀

The release is available on:

Cheers! 馃摝馃殌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers, please hop on! status: accepting prs Please, send a pull request to resolve this! type: feature New enhancement or request
Projects
None yet
1 participant