Skip to content

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

Merged
patak-cat merged 6 commits intovitejs:mainfrom
HenryVogt:add-vanilla-ts-template
Apr 10, 2021
Merged

feat(create-app): add template vanilla-ts#2023
patak-cat merged 6 commits intovitejs:mainfrom
HenryVogt:add-vanilla-ts-template

Conversation

@HenryVogt
Copy link
Copy Markdown
Contributor

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

@yyx990803
Copy link
Copy Markdown
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
Copy Markdown

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
Copy Markdown

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
Copy Markdown
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
Comment thread packages/create-app/template-vanilla-ts/package.json Outdated
@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
Copy Markdown
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

Comment thread packages/create-app/template-vanilla-ts/src/style.css Outdated
Comment thread packages/create-app/template-vanilla-ts/src/main.ts Outdated
@antfu
Copy link
Copy Markdown
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-cat April 10, 2021 01:45
@patak-cat patak-cat 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
Copy Markdown
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-cat
Copy link
Copy Markdown
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.

9 participants