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

[Feature Request] Docs when getting started with TypeScript #706

Open
3 tasks done
htnabe opened this issue Dec 11, 2024 · 7 comments
Open
3 tasks done

[Feature Request] Docs when getting started with TypeScript #706

htnabe opened this issue Dec 11, 2024 · 7 comments

Comments

@htnabe
Copy link

htnabe commented Dec 11, 2024

I have recently started using Electron and thought it would be nice if the tutorial included instructions on how to get started using TypeScript.

Proposed Solution

I think there is a way to write about how to get started in TS in a steady way.

However, to start small, I think it would be very meaningful for beginners just to introduce electron-vite, nextron, etc. and let them know that they can build a TS environment from scratch there.

Sorry if I have simply missed something.

@htnabe htnabe changed the title [Feature Request] Docs when getting Started with TypeScript [Feature Request] Docs when getting started with TypeScript Dec 11, 2024
@Shashikumar-ezhilarasu
Copy link

Hi, I would like to work on this issue. Could you please assign it to me? @htnabe
I plan to update the documentation to include instructions for getting started with TypeScript in Electron.
This will cover:
Setting up a basic Electron project with TypeScript
Using electron-vite or nextron for a quicker setup
Adding a section explaining the benefits of TypeScript with Electron.
I'll ensure the changes align with the contributing guidelines.

@htnabe
Copy link
Author

htnabe commented Dec 16, 2024

@Shashikumar-ezhilarasu I am not one of the main mainteners, so I can't assign you.

@htnabe
Copy link
Author

htnabe commented Dec 17, 2024

Before we do that, we have to make it clear whether this topic is enough meaningful to the users of electron.
How do you, the maintainers, think about this issue?

@Shashikumar-ezhilarasu
Copy link

Hi @htnabe ,

Thank you for considering this! I believe that including instructions for getting started with TypeScript in Electron would be highly valuable for users.

Rationale:

TypeScript has become a popular choice for many developers as it adds type safety and better tooling to JavaScript. Providing beginners with clear documentation on integrating TypeScript will help lower the entry barrier for those wanting to use it with Electron.
Tools like electron-vite and nextron streamline the setup process and can save users time. Introducing them would make it easier for developers to adopt TypeScript.
Proposed Documentation Outline:

Setting up Electron with TypeScript: A step-by-step guide for creating a basic TypeScript environment.
Using electron-vite/nextron: Quick-start options for those who prefer pre-configured solutions.
Benefits of TypeScript in Electron: A brief explanation of why TypeScript can be helpful in Electron projects.

If the maintainers agree that this is a meaningful addition, I'd be happy to start working on it. Let me know your thoughts!!

@nikwen
Copy link

nikwen commented Dec 26, 2024

An easy way to get started with Electron and TypeScript is to use Electron Forge with a TypeScript template.

Since you mentioned Vite, here's the Vite template: https://www.electronforge.io/templates/vite-+-typescript

@htnabe
Copy link
Author

htnabe commented Dec 26, 2024

@nikwen Thanks for the advice!
The template you gave us is very useful as an official announcement!

As of Electron Forge v7.5.0, Vite support for Electron Forge has been marked as experimental...
Future minor releases may contain breaking changes, but migration steps will be listed in release notes.

On the other hand, I still think it's important to introduce some stable ones like electron-vite, nextron.

@nikwen
Copy link

nikwen commented Dec 26, 2024

@htnabe Check this for why the change was made: https://github.com/electron/forge/releases/tag/v7.5.0

I think it's totally fine to use the Vite plugin in Electron Forge despite the label that sounds scary.

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

No branches or pull requests

3 participants