UNPKG

5.36 kBMarkdownView Raw
1[![Electron Logo](https://electronjs.org/images/electron-logo.svg)](https://electronjs.org)
2
3[![GitHub Actions Build Status](https://github.com/electron/electron/actions/workflows/build.yml/badge.svg)](https://github.com/electron/electron/actions/workflows/build.yml)
4[![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/4lggi9dpjc1qob7k/branch/main?svg=true)](https://ci.appveyor.com/project/electron-bot/electron-ljo26/branch/main)
5[![Electron Discord Invite](https://img.shields.io/discord/745037351163527189?color=%237289DA&label=chat&logo=discord&logoColor=white)](https://discord.gg/electronjs)
6
7:memo: Available Translations: πŸ‡¨πŸ‡³ πŸ‡§πŸ‡· πŸ‡ͺπŸ‡Έ πŸ‡―πŸ‡΅ πŸ‡·πŸ‡Ί πŸ‡«πŸ‡· πŸ‡ΊπŸ‡Έ πŸ‡©πŸ‡ͺ.
8View these docs in other languages on our [Crowdin](https://crowdin.com/project/electron) project.
9
10The Electron framework lets you write cross-platform desktop applications
11using JavaScript, HTML and CSS. It is based on [Node.js](https://nodejs.org/) and
12[Chromium](https://www.chromium.org) and is used by the
13[Visual Studio Code](https://github.com/Microsoft/vscode/) and many other [apps](https://electronjs.org/apps).
14
15Follow [@electronjs](https://twitter.com/electronjs) on Twitter for important
16announcements.
17
18This project adheres to the Contributor Covenant
19[code of conduct](https://github.com/electron/electron/tree/main/CODE_OF_CONDUCT.md).
20By participating, you are expected to uphold this code. Please report unacceptable
21behavior to [coc@electronjs.org](mailto:coc@electronjs.org).
22
23## Installation
24
25To install prebuilt Electron binaries, use [`npm`](https://docs.npmjs.com/).
26The preferred method is to install Electron as a development dependency in your
27app:
28
29```sh
30npm install electron --save-dev
31```
32
33For more installation options and troubleshooting tips, see
34[installation](docs/tutorial/installation.md). For info on how to manage Electron versions in your apps, see
35[Electron versioning](docs/tutorial/electron-versioning.md).
36
37## Platform support
38
39Each Electron release provides binaries for macOS, Windows, and Linux.
40
41* macOS (Big Sur and up): Electron provides 64-bit Intel and Apple Silicon / ARM binaries for macOS.
42* Windows (Windows 10 and up): Electron provides `ia32` (`x86`), `x64` (`amd64`), and `arm64` binaries for Windows. Windows on ARM support was added in Electron 5.0.8. Support for Windows 7, 8 and 8.1 was [removed in Electron 23, in line with Chromium's Windows deprecation policy](https://www.electronjs.org/blog/windows-7-to-8-1-deprecation-notice).
43* Linux: The prebuilt binaries of Electron are built on Ubuntu 20.04. They have also been verified to work on:
44 * Ubuntu 18.04 and newer
45 * Fedora 32 and newer
46 * Debian 10 and newer
47
48## Quick start & Electron Fiddle
49
50Use [`Electron Fiddle`](https://github.com/electron/fiddle)
51to build, run, and package small Electron experiments, to see code examples for all of Electron's APIs, and
52to try out different versions of Electron. It's designed to make the start of your journey with
53Electron easier.
54
55Alternatively, clone and run the
56[electron/electron-quick-start](https://github.com/electron/electron-quick-start)
57repository to see a minimal Electron app in action:
58
59```sh
60git clone https://github.com/electron/electron-quick-start
61cd electron-quick-start
62npm install
63npm start
64```
65
66## Resources for learning Electron
67
68* [electronjs.org/docs](https://electronjs.org/docs) - All of Electron's documentation
69* [electron/fiddle](https://github.com/electron/fiddle) - A tool to build, run, and package small Electron experiments
70* [electron/electron-quick-start](https://github.com/electron/electron-quick-start) - A very basic starter Electron app
71* [electronjs.org/community#boilerplates](https://electronjs.org/community#boilerplates) - Sample starter apps created by the community
72
73## Programmatic usage
74
75Most people use Electron from the command line, but if you require `electron` inside
76your **Node app** (not your Electron app) it will return the file path to the
77binary. Use this to spawn Electron from Node scripts:
78
79```javascript
80const electron = require('electron')
81const proc = require('node:child_process')
82
83// will print something similar to /Users/maf/.../Electron
84console.log(electron)
85
86// spawn Electron
87const child = proc.spawn(electron)
88```
89
90### Mirrors
91
92* [China](https://npmmirror.com/mirrors/electron/)
93
94See the [Advanced Installation Instructions](https://www.electronjs.org/docs/latest/tutorial/installation#mirror) to learn how to use a custom mirror.
95
96## Documentation translations
97
98We crowdsource translations for our documentation via [Crowdin](https://crowdin.com/project/electron).
99We currently accept translations for Chinese (Simplified), French, German, Japanese, Portuguese,
100Russian, and Spanish.
101
102## Contributing
103
104If you are interested in reporting/fixing issues and contributing directly to the code base, please see [CONTRIBUTING.md](CONTRIBUTING.md) for more information on what we're looking for and how to get started.
105
106## Community
107
108Info on reporting bugs, getting help, finding third-party tools and sample apps,
109and more can be found on the [Community page](https://www.electronjs.org/community).
110
111## License
112
113[MIT](https://github.com/electron/electron/blob/main/LICENSE)
114
115When using Electron logos, make sure to follow [OpenJS Foundation Trademark Policy](https://trademark-policy.openjsf.org/).