electron/README.md

111 строки
4.9 KiB
Markdown
Исходник Обычный вид История

[![Electron Logo](https://electron.atom.io/images/electron-logo.svg)](https://electron.atom.io/)
2015-04-23 23:46:48 +03:00
2016-04-04 22:18:37 +03:00
[![Travis Build Status](https://travis-ci.org/electron/electron.svg?branch=master)](https://travis-ci.org/electron/electron)
2017-03-14 20:13:53 +03:00
[![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/bc56v83355fi3369/branch/master?svg=true)](https://ci.appveyor.com/project/electron-bot/electron/branch/master)
[![devDependency Status](https://david-dm.org/electron/electron/dev-status.svg)](https://david-dm.org/electron/electron?type=dev)
2015-06-30 02:46:22 +03:00
[![Join the Electron Community on Slack](http://atom-slack.herokuapp.com/badge.svg)](http://atom-slack.herokuapp.com/)
:memo: Available Translations: 🇨🇳 🇹🇼 🇧🇷 🇪🇸 🇰🇷 🇯🇵 🇷🇺 🇫🇷 🇹🇭 🇳🇱 🇹🇷 🇮🇩 🇺🇦 🇨🇿 🇮🇹.
View these docs in other languages at [electron/electron-i18n](https://github.com/electron/electron-i18n/tree/master/content/).
2017-08-08 20:55:09 +03:00
2015-04-08 20:16:10 +03:00
The Electron framework lets you write cross-platform desktop applications
2015-11-03 20:13:48 +03:00
using JavaScript, HTML and CSS. It is based on [Node.js](https://nodejs.org/) and
2016-05-24 20:20:52 +03:00
[Chromium](http://www.chromium.org) and is used by the [Atom
editor](https://github.com/atom/atom) and many other [apps](https://electron.atom.io/apps).
2013-04-12 05:46:58 +04:00
2015-04-24 03:00:04 +03:00
Follow [@ElectronJS](https://twitter.com/electronjs) on Twitter for important
announcements.
This project adheres to the Contributor Covenant
2017-08-08 20:18:40 +03:00
[code of conduct](https://github.com/electron/electron/tree/master/CODE_OF_CONDUCT.md).
By participating, you are expected to uphold this code. Please report unacceptable
2017-08-08 20:18:40 +03:00
behavior to [electron@github.com](mailto:electron@github.com).
2015-07-08 23:29:24 +03:00
2017-08-08 20:18:40 +03:00
## Installation
2013-04-12 05:46:58 +04:00
2017-08-08 20:18:40 +03: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:
```sh
2017-08-08 20:18:40 +03:00
npm install electron --save-dev --save-exact
```
The `--save-exact` flag is recommended as Electron does not follow semantic
versioning. For info on how to manage Electron versions in your apps, see
[Electron versioning](https://electron.atom.io/docs/tutorial/electron-versioning/).
For more installation options and troubleshooting tips, see
[installation](https://electron.atom.io/docs/tutorial/installation/).
## Quick Start
Clone and run the
2017-08-08 20:18:40 +03:00
[electron/electron-quick-start](https://github.com/electron/electron-quick-start)
repository to see a minimal Electron app in action:
```
git clone https://github.com/electron/electron-quick-start
cd electron-quick-start
npm install
npm start
```
2017-08-08 20:18:40 +03:00
## Resources for Learning Electron
2017-08-08 20:18:40 +03:00
- [electron.atom.io/docs](http://electron.atom.io/docs) - all of Electron's documentation
- [electron/electron-quick-start](https://github.com/electron/electron-quick-start) - a very basic starter Electron app
- [electron.atom.io/community/#boilerplates](http://electron.atom.io/community/#boilerplates) - sample starter apps created by the community
- [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 17:30:33 +03:00
2017-08-08 20:18:40 +03: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 17:30:33 +03:00
2017-08-08 20:18:40 +03:00
```javascript
const electron = require('electron')
const proc = require('child_process')
2013-04-12 05:46:58 +04:00
2017-08-08 20:18:40 +03: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 22:32:24 +04:00
2015-08-23 18:19:37 +03:00
## Documentation Translations
2017-11-12 19:03:43 +03:00
Find documentation translations in [electron/electron-18n](https://github.com/electron/electron-i18n).
2015-08-23 18:19:37 +03:00
2014-05-14 22:32:24 +04:00
## Community
2015-10-03 08:42:34 +03:00
You can ask questions and interact with the community in the following
locations:
2015-11-03 08:16:12 +03:00
- [`electron`](http://discuss.atom.io/c/electron) category on the Atom
forums
- `#atom-shell` channel on Freenode
- [`Atom`](http://atom-slack.herokuapp.com/) channel on Slack
2017-05-05 19:34:53 +03:00
- [`electron-ru`](https://telegram.me/electron_ru) *(Russian)*
2015-12-02 18:27:23 +03:00
- [`electron-br`](https://electron-br.slack.com) *(Brazilian Portuguese)*
- [`electron-kr`](https://electron-kr.github.io/electron-kr) *(Korean)*
2016-12-25 12:07:25 +03:00
- [`electron-jp`](https://electron-jp.slack.com) *(Japanese)*
- [`electron-tr`](http://electron-tr.herokuapp.com) *(Turkish)*
- [`electron-id`](https://electron-id.slack.com) *(Indonesia)*
2016-06-22 11:02:14 +03:00
2015-10-03 08:42:34 +03:00
Check out [awesome-electron](https://github.com/sindresorhus/awesome-electron)
for a community maintained list of useful example apps, tools and resources.
2016-10-01 06:33:51 +03:00
## License
2016-11-08 01:26:21 +03:00
[MIT](https://github.com/electron/electron/blob/master/LICENSE)
2016-11-08 01:26:21 +03:00
When using the Electron or other GitHub logos, be sure to follow the [GitHub logo guidelines](https://github.com/logos).