2017-11-19 04:01:33 -08:00
[![Electron Logo ](https://electronjs.org/images/electron-logo.svg )](https://electronjs.org)
2015-04-23 16:46:48 -04:00
2017-11-30 15:39:32 -05:00
[![CircleCI Build Status ](https://circleci.com/gh/electron/electron/tree/master.svg?style=shield )](https://circleci.com/gh/electron/electron/tree/master)
[![AppVeyor Build Status ](https://windows-ci.electronjs.org/api/projects/status/nilyf07hcef14dvj/branch/master?svg=true )](https://windows-ci.electronjs.org/project/AppVeyor/electron/branch/master)
2016-10-12 20:17:26 +00:00
[![devDependency Status ](https://david-dm.org/electron/electron/dev-status.svg )](https://david-dm.org/electron/electron?type=dev)
2017-11-22 01:14:29 -08:00
[![Join the Electron Community on Slack ](https://atom-slack.herokuapp.com/badge.svg )](https://atom-slack.herokuapp.com/)
2015-06-29 16:46:22 -07:00
2017-11-17 12:44:21 +08:00
:memo: Available Translations: 🇨🇳 🇹🇼 🇧🇷 🇪🇸 🇰🇷 🇯🇵 🇷🇺 🇫🇷 🇹🇭 🇳🇱 🇹🇷 🇮🇩 🇺🇦 🇨🇿 🇮🇹.
2018-03-02 12:05:49 -08:00
View these docs in other languages at [electron/i18n ](https://github.com/electron/i18n/tree/master/content/ ).
2017-08-08 10:55:09 -07:00
2015-04-08 10:16:10 -07:00
The Electron framework lets you write cross-platform desktop applications
2015-11-03 09:13:48 -08:00
using JavaScript, HTML and CSS. It is based on [Node.js ](https://nodejs.org/ ) and
2017-11-22 01:14:29 -08:00
[Chromium ](https://www.chromium.org ) and is used by the [Atom
2017-11-19 04:01:33 -08:00
editor](https://github.com/atom/atom) and many other [apps ](https://electronjs.org/apps ).
2013-04-12 09:46:58 +08:00
2015-04-23 17:00:04 -07:00
Follow [@ElectronJS ](https://twitter.com/electronjs ) on Twitter for important
announcements.
2017-11-17 12:44:21 +08:00
This project adheres to the Contributor Covenant
2017-08-08 10:18:40 -07:00
[code of conduct ](https://github.com/electron/electron/tree/master/CODE_OF_CONDUCT.md ).
2015-12-03 18:06:58 -06:00
By participating, you are expected to uphold this code. Please report unacceptable
2018-03-14 12:37:40 -07:00
behavior to [coc@electronjs.org ](mailto:coc@electronjs.org ).
2015-07-08 16:29:24 -04:00
2017-08-08 10:18:40 -07:00
## Installation
2013-04-12 09:46:58 +08:00
2017-08-08 10:18:40 -07:00
To install prebuilt Electron binaries, use [`npm` ](https://docs.npmjs.com/ ).
The preferred method is to install Electron as a development dependency in your
app:
2015-04-17 11:25:06 -07:00
2015-04-29 13:56:31 -04:00
```sh
2018-05-14 14:06:22 +03:00
npm install electron --save-dev [--save-exact]
2017-08-08 10:18:40 -07:00
```
2018-05-14 14:06:22 +03:00
The `--save-exact` flag is recommended for Electron prior to version 2, as it does not follow semantic
versioning. 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
2017-12-13 22:18:00 +09:00
[Electron versioning ](docs/tutorial/electron-versioning.md ).
2017-08-08 10:18:40 -07:00
For more installation options and troubleshooting tips, see
2017-12-06 14:32:11 -08:00
[installation ](docs/tutorial/installation.md ).
2017-08-08 10:18:40 -07:00
2017-11-19 09:48:09 -08:00
## Quick start
2016-11-14 13:52:07 -08:00
2017-11-17 12:44:21 +08:00
Clone and run the
2017-08-08 10:18:40 -07:00
[electron/electron-quick-start ](https://github.com/electron/electron-quick-start )
repository to see a minimal Electron app in action:
2017-11-19 02:48:06 -08:00
```sh
2017-08-08 10:18:40 -07:00
git clone https://github.com/electron/electron-quick-start
cd electron-quick-start
npm install
npm start
2015-04-17 11:25:06 -07:00
```
2017-11-19 09:51:03 -08:00
## Resources for learning Electron
2016-11-14 13:52:07 -08:00
2017-11-19 04:01:33 -08:00
- [electronjs.org/docs ](https://electronjs.org/docs ) - all of Electron's documentation
2017-08-08 10:18:40 -07:00
- [electron/electron-quick-start ](https://github.com/electron/electron-quick-start ) - a very basic starter Electron app
2017-11-19 04:01:33 -08:00
- [electronjs.org/community#boilerplates ](https://electronjs.org/community#boilerplates ) - sample starter apps created by the community
2017-08-08 10:18:40 -07:00
- [electron/simple-samples ](https://github.com/electron/simple-samples ) - small applications with ideas for taking them further
- [electron/electron-api-demos ](https://github.com/electron/electron-api-demos ) - an Electron app that teaches you how to use Electron
- [hokein/electron-sample-apps ](https://github.com/hokein/electron-sample-apps ) - small demo apps for the various Electron APIs
2015-01-19 22:30:33 +08:00
2017-08-08 10:18:40 -07:00
## Programmatic usage
Most people use Electron from the command line, but if you require `electron` inside
your **Node app** (not your Electron app) it will return the file path to the
binary. Use this to spawn Electron from Node scripts:
2015-01-19 22:30:33 +08:00
2017-08-08 10:18:40 -07:00
```javascript
const electron = require('electron')
const proc = require('child_process')
2013-04-12 09:46:58 +08:00
2017-08-08 10:18:40 -07:00
// will print something similar to /Users/maf/.../Electron
console.log(electron)
// spawn Electron
const child = proc.spawn(electron)
```
### Mirrors
- [China ](https://npm.taobao.org/mirrors/electron )
2014-05-14 11:32:24 -07:00
2015-08-23 17:19:37 +02:00
## Documentation Translations
2018-03-02 12:05:49 -08:00
Find documentation translations in [electron/i18n ](https://github.com/electron/i18n ).
2015-08-23 17:19:37 +02:00
2014-05-14 11:32:24 -07:00
## Community
2018-04-30 18:26:08 -05:00
Info on reporting bugs, getting help, finding third-party tools and sample apps,
and more can be found in the [support document ](docs/tutorial/support.md#finding-support ).
2016-10-01 00:33:51 -03:00
## License
2016-11-07 14:26:21 -08:00
[MIT ](https://github.com/electron/electron/blob/master/LICENSE )
2016-11-07 12:08:11 -08:00
2016-11-07 14:26:21 -08:00
When using the Electron or other GitHub logos, be sure to follow the [GitHub logo guidelines ](https://github.com/logos ).