-
Notifications
You must be signed in to change notification settings - Fork 137
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
Add TypeScript support and fix config bug #20
base: main
Are you sure you want to change the base?
Add TypeScript support and fix config bug #20
Conversation
Still, I hope this PR will be noticed c:
@joshwcomeau Would really love to get this merged as I only use TypeScript these days. Wanted to use this utility for a project, but I refuse to use plain JS 😄 |
@robert-orlinski @Coupz I'm using version 4.0.1 and it works for me. I originally came here to update the README to mention it supports TSX, mine is configured for TSX via the JSON file which is located in my home directory.
I also just changed that to "ts" and created a quick component, it worked fine. I also checked using the -x flag as shown and that all worked fine: Seems to work for whatever value you provide so wanna try again on your machines? |
As discussed here joshwcomeau#20 (comment) the tool supports more than just js and jsx so I've updated to README accordingly.
I've just tested it again, completely new installation of new-component and it still generates Edit: it works with the |
Ah, I'm on mac. Maybe it is a Windows issue? To clarify do you mean that it works with the config file at the root of your app? Or it doesn't and is only respecting the |
Exactly. It ignores the config file and only respects the |
The same for me in Linux (Ubuntu 20.04). Tried both local project and global locations for the config file. |
Hi!
I am a huge fan of this flat components' structure and this simple CLI. Also, I am a huge fan of TypeScript and the lack of support for this language was a little pain for me when it comes to that utility.
That's the reason for this PR 😌
Added:
Fixed:
Hope it will be useful!