gitmyhub

minimal-repro

JavaScript ★ 11k updated 1d ago

Clone to try a simple Electron app

A minimal Electron app template maintained by the Electron team for creating stripped-down bug reproductions, containing only the four essential files that make an Electron desktop app run.

JavaScriptElectronNode.jsHTMLsetup: easycomplexity 1/5

This repository is a minimal starter template for Electron apps, maintained by the Electron team itself. Electron is a framework that lets developers build desktop applications using web technologies, meaning the same kind of code used to build websites can be used to make apps that run on Windows, macOS, and Linux.

The primary purpose of this template is to help developers create a minimal reproduction when reporting a bug. A minimal reproduction means stripping an app down to only the code needed to show a specific problem, so that the people investigating the bug can focus on exactly the issue at hand without unrelated code in the way. The repository was previously named electron-quick-start and has been renamed to make this purpose clearer.

The template contains four files. The package.json file describes the app and its dependencies. The main.js file starts the application and creates the desktop window, which is called the main process. The index.html file is the web page displayed inside that window, called the renderer process. The preload.js file runs a script before the page loads and can bridge the two processes.

To run it, you clone the repository, install its dependencies with npm, and then run npm start. Git and Node.js are the only prerequisites.

If you are looking to start a new Electron app from scratch rather than reproduce a bug, the README points to Electron Forge, which is the recommended tool for bootstrapping full projects.

Where it fits