minimal-repro README

The project's README from github.com/electron/minimal-repro. As one markdown file: README.md.

minimal-repro

Quickly create and share examples of Electron app behaviors or bugs.

[!NOTE] This repro was renamed from electron-quick-start to clarify its purpose as a repro template. If you're looking to boostrap a new Electron app, check out the Electron Forge docs instead to get started!

Creating a minimal reproduction (or "minimal repro") is essential when troubleshooting Electron apps. By stripping away everything except the code needed to demonstrate a specific behavior or bug, it becomes easier for others to understand, debug, and fix issues. This focused approach saves time and ensures that everyone involved is looking at exactly the same problem without distractions.

A basic Electron application contains:

You can learn more about each of these components in depth within the Tutorial.

To Use

To clone and run this repository you'll need Git and Node.js (which comes with npm) installed on your computer. From your command line:

# Clone this repository
git clone https://github.com/electron/minimal-repro
# Go into the repository
cd minimal-repro
# Install dependencies
npm install
# Run the app
npm start

Note: If you're using Linux Bash for Windows, see this guide or use node from the command prompt.

Resources for Learning Electron

License

CC0 1.0 (Public Domain)

minimal-repro (electron/minimal-repro)

Searching Database…

这是什么?一个极简的 Electron 应用模板,用来创建和分享 Electron 应用行为或 bug 的小型复现示例,方便他人在没有多余干扰的情况下调试同一个聚焦的问题。
这是新应用的入门模板,还是仅用于 bug 复现的模板?它专门是一个复现模板(原名 electron-quick-start),用于隔离和演示问题,而不是用来初始化新 Electron 应用的脚手架工具。
我该怎么让它运行起来?克隆仓库,然后用 npm/Node.js 在命令行中运行;package.json 中的 start 脚本会执行 'electron .'。
克隆之前,我需要先安装什么吗?你的电脑上需要安装 Git 和 Node.js(其中包含 npm)。
我能用它来启动一个全新的 Electron 项目吗?不能,它仅用于 bug 复现。若要初始化新应用,你应该改用 Electron Forge。
它能在 Windows、macOS 和 Linux 上运行吗?可以,因为它是标准的 Electron 应用,可以跨平台运行;README 特别提醒了在 Windows 上使用 Linux Bash 的用户需要注意的事项。
这个极简应用由哪些文件组成?它包含 package.json(应用元数据和依赖)、main.js(创建浏览器窗口的主进程)、index.html(渲染进程页面)以及 preload.js(在渲染页面加载前运行的脚本)。
Creator
electron
Size
1.4 MB
Stars
11.4K
Updated
CommitOct 16
Age
11y
Commits · 90 Days