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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow tsx file extension for sub-commands (#1367) #1368

Merged
merged 1 commit into from Oct 4, 2020
Merged

Allow tsx file extension for sub-commands (#1367) #1368

merged 1 commit into from Oct 4, 2020

Conversation

brunomacf
Copy link
Contributor

@brunomacf brunomacf commented Oct 1, 2020

Pull Request

Problem

I'm using ink to implement my cli-app which uses React and right now commander does not look for sub-command files in tsx extension. This PR add tsx as a valid file extension when looking for sub-command files.

Related Issue: #1367

Solution

It's a very simple PR where i just added tsx as valid file extension in _executeSubCommand function.

ChangeLog

@shadowspawn
Copy link
Collaborator

How are you running your program so that .tsx files can be opened by node?

I know how this works with ts-node and .ts, not sure if the same for .tsx:

node -r ts-node/register pm.ts

@brunomacf
Copy link
Contributor Author

@shadowspawn yep is essentially the same thing... and i'm using exactly that command to run it here with tsx files :)

Copy link
Collaborator

@shadowspawn shadowspawn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Collaborator

@abetomo abetomo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@shadowspawn shadowspawn merged commit 39eadd7 into tj:develop Oct 4, 2020
@shadowspawn shadowspawn added the pending release Merged into a branch for a future release, but not released yet label Oct 4, 2020
@shadowspawn shadowspawn removed the pending release Merged into a branch for a future release, but not released yet label Oct 25, 2020
@shadowspawn
Copy link
Collaborator

Released in Commander v6.2.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants