UNPKG

4.96 kBMarkdownView Raw
1[![Electron Logo](https://electronjs.org/images/electron-logo.svg)](https://electronjs.org)
2
3
4[![CircleCI Build Status](https://circleci.com/gh/electron/electron/tree/master.svg?style=shield)](https://circleci.com/gh/electron/electron/tree/master)
5[![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/4lggi9dpjc1qob7k/branch/master?svg=true)](https://ci.appveyor.com/project/electron-bot/electron-ljo26/branch/master)
6[![devDependency Status](https://david-dm.org/electron/electron/dev-status.svg)](https://david-dm.org/electron/electron?type=dev)
7
8:memo: Available Translations: 🇨🇳 🇹🇼 🇧🇷 🇪🇸 🇰🇷 🇯🇵 🇷🇺 🇫🇷 🇹🇭 🇳🇱 🇹🇷 🇮🇩 🇺🇦 🇨🇿 🇮🇹 🇵🇱.
9View these docs in other languages at [electron/i18n](https://github.com/electron/i18n/tree/master/content/).
10
11The Electron framework lets you write cross-platform desktop applications
12using JavaScript, HTML and CSS. It is based on [Node.js](https://nodejs.org/) and
13[Chromium](https://www.chromium.org) and is used by the [Atom
14editor](https://github.com/atom/atom) and many other [apps](https://electronjs.org/apps).
15
16Follow [@ElectronJS](https://twitter.com/electronjs) on Twitter for important
17announcements.
18
19This project adheres to the Contributor Covenant
20[code of conduct](https://github.com/electron/electron/tree/master/CODE_OF_CONDUCT.md).
21By participating, you are expected to uphold this code. Please report unacceptable
22behavior to [coc@electronjs.org](mailto:coc@electronjs.org).
23
24## Installation
25
26To install prebuilt Electron binaries, use [`npm`](https://docs.npmjs.com/).
27The preferred method is to install Electron as a development dependency in your
28app:
29
30```sh
31npm install electron --save-dev [--save-exact]
32```
33
34The `--save-exact` flag is recommended for Electron prior to version 2, as it does not follow semantic
35versioning. As of version 2.0.0, Electron follows semver, so you don't need `--save-exact` flag. For info on how to manage Electron versions in your apps, see
36[Electron versioning](docs/tutorial/electron-versioning.md).
37
38For more installation options and troubleshooting tips, see
39[installation](docs/tutorial/installation.md).
40
41## Quick start & Electron Fiddle
42
43Use [`Electron Fiddle`](https://github.com/electron/fiddle)
44to build, run, and package small Electron experiments, to see code examples for all of Electron's APIs, and
45to try out different versions of Electron. It's designed to make the start of your journey with
46Electron easier.
47
48Alternatively, clone and run the
49[electron/electron-quick-start](https://github.com/electron/electron-quick-start)
50repository to see a minimal Electron app in action:
51
52```sh
53git clone https://github.com/electron/electron-quick-start
54cd electron-quick-start
55npm install
56npm start
57```
58
59## Resources for learning Electron
60
61- [electronjs.org/docs](https://electronjs.org/docs) - all of Electron's documentation
62- [electron/fiddle](https://github.com/electron/fiddle) - A tool to build, run, and package small Electron experiments
63- [electron/electron-quick-start](https://github.com/electron/electron-quick-start) - a very basic starter Electron app
64- [electronjs.org/community#boilerplates](https://electronjs.org/community#boilerplates) - sample starter apps created by the community
65- [electron/simple-samples](https://github.com/electron/simple-samples) - small applications with ideas for taking them further
66- [electron/electron-api-demos](https://github.com/electron/electron-api-demos) - an Electron app that teaches you how to use Electron
67- [hokein/electron-sample-apps](https://github.com/hokein/electron-sample-apps) - small demo apps for the various Electron APIs
68
69## Programmatic usage
70
71Most people use Electron from the command line, but if you require `electron` inside
72your **Node app** (not your Electron app) it will return the file path to the
73binary. Use this to spawn Electron from Node scripts:
74
75```javascript
76const electron = require('electron')
77const proc = require('child_process')
78
79// will print something similar to /Users/maf/.../Electron
80console.log(electron)
81
82// spawn Electron
83const child = proc.spawn(electron)
84```
85
86### Mirrors
87
88- [China](https://npm.taobao.org/mirrors/electron)
89
90## Documentation Translations
91
92Find documentation translations in [electron/i18n](https://github.com/electron/i18n).
93
94## Contributing
95
96If 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.
97
98## Community
99
100Info on reporting bugs, getting help, finding third-party tools and sample apps,
101and more can be found in the [support document](docs/tutorial/support.md#finding-support).
102
103## License
104
105[MIT](https://github.com/electron/electron/blob/master/LICENSE)
106
107When using the Electron or other GitHub logos, be sure to follow the [GitHub logo guidelines](https://github.com/logos).