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

feat(create-app): add template vanilla-ts #2023

Merged
merged 6 commits into from
Apr 10, 2021

Conversation

HenryVogt
Copy link
Contributor

According to the other templates it might be a helpful addition to have a vanilla typescript template aswell.

@yyx990803
Copy link
Member

Hmm, I'm not sure if this is even necessary since it really just needs a tsconfig.json on top of vanilla. But thanks for the PR anyway!

@yyx990803 yyx990803 closed this Feb 15, 2021
@elwynelwyn
Copy link

I tried to use vanilla-ts as I expected it to exist based on the other templates, and came looking here when I realised it doesn't exist. Just a +1 on wanting this template to exist!

Aside from my mismatched expectations causing a bump in my otherwise smooth Vite onboarding, I think it's worth noting it's not just adding a tsconfig.json (and going and looking up which values I need to paste in), it's also renaming main.js -> main.ts, going into index.html and renaming the src to point at .ts. Sure, all simple and trivial stuff, but I've done that 5 or 6 times today when scaffolding out modules and it's pretty tedious

@WuTheFWasThat
Copy link

WuTheFWasThat commented Mar 1, 2021

agree would've been nice to have! (although it's also great that it works with such minimal changes from vanilla)

@antfu
Copy link
Member

antfu commented Apr 4, 2021

Maybe we can reconsider having this template?

We are having a few contributors request this again #2814, #2849

I think not only this could help ppl to get started quickly without doing the .js -> .ts renaming repeatedly, but also as an example showing ppl that "we support ts out-of-box, so you don't need to dig in and make the complex setup to get it work".

@antfu antfu reopened this Apr 4, 2021
@antfu antfu changed the title feat(cli): add template vanilla-ts feat(create-app): add template vanilla-ts Apr 4, 2021
@Shinigami92 Shinigami92 added enhancement New feature or request p2-nice-to-have Not breaking anything but nice to have (priority) labels Apr 4, 2021
@Shinigami92 Shinigami92 self-requested a review April 4, 2021 09:59
Copy link
Member

@antfu antfu left a comment

Choose a reason for hiding this comment

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

Also think we should adapt "build": "tsc && vite build" from #2849

@antfu
Copy link
Member

antfu commented Apr 10, 2021

I am going to make changes to this PR directly and push this thing ready for merging.

@antfu antfu self-assigned this Apr 10, 2021
@antfu antfu requested a review from patak-dev April 10, 2021 01:45
@patak-dev patak-dev merged commit 89898d3 into vitejs:main Apr 10, 2021
@HenryVogt HenryVogt deleted the add-vanilla-ts-template branch July 7, 2021 07:25
@HenryVogt
Copy link
Contributor Author

Thanks for taking my proposal into the project. Unfortunatly I was somehow not notified about the further discussions, so please excuse me for not taking part in the conversation.

@patak-dev
Copy link
Member

Not a problem @HenryVogt, thanks for the PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request p2-nice-to-have Not breaking anything but nice to have (priority)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants