Where can I find a basic tutorial for Electron?


#1

I have spent all night looking through tutorials for creating apps with Electron, and none of them are working. Any time I try to run anything I get piles of errors. I went to the “Quickstart” documentation, but nowhere on the page is there anything that explains how to actually start an electron project.

Examples of the struggles I’ve come across: How do I use npm? How do I install electron? Are there files I need to download before I can start writing my actual app? How do I run my app once I’ve written it? None of these questions are answered by any of the documentation I’ve seen. I’ve seen tutorials telling me to enter stuff into the “CLI” (without explaining what that is or where I might find it) and I’ve tried, but command prompt just throws errors.

What I’m looking for is this:

  1. What do I need to download, and where do I need to put it?
  2. What installation/setup steps do I need to take?
  3. Where do I start writing the webpages that make up my app? Where should my html/css/javascript go?
  4. How do I run it in order to test what I’m made?

I also do not intend to use Git or GitHub, as those are beyond overkill for what I’m trying to do, unless they are absolutely necessary.


#2

NPM is a package manager that comes with Node. It has a web site that explains how to use it.

How do I install electron?

You don’t. You install Node and package the Electron files in with your app. The packaging can be done manually or using a third-party program.

Are there files I need to download before I can start writing my actual app?

Accurate answer: no. You can write the entire load of JS and HTML before you ever touch Electron. It’s actually relatively easy to drop an existing web app into Electron, you just need to tweak a few things.

Reasonable answer: yes. You’re new, so download Electron, write the most basic bits, and see how your work turns out.

How do I run my app once I’ve written it?

The Electron executable.

None of these questions are answered by any of the documentation I’ve seen.

I have provided links to documentation that answers them.

I’ve seen tutorials telling me to enter stuff into the “CLI” (without explaining what that is or where I might find it) and I’ve tried, but command prompt just throws errors.

If you have neither Node nor Electron downloaded, this will happen. Also, are you using bare cmd.exe?

I also do not intend to use Git or GitHub, as those are beyond overkill for what I’m trying to do, unless they are absolutely necessary.

They’re just very useful for keeping track of things, and also for getting help. An app with source code on Github can be easily looked at by other people.