electron

2018-09-15 admin

electron是什么

什么是electron,Build cross platform desktop apps with JavaScript, HTML, and CSS

electron使用教程帮助文档

Electron Logo

CircleCI Build Status AppVeyor Build Status devDependency Status Join the Electron Community on Slack

<g-emoji class=“g-emoji” alias=“memo” fallback-src=“https://assets-cdn.github.com/images/icons/emoji/unicode/1f4dd.png”>📝</g-emoji> Available Translations: <g-emoji class=“g-emoji” alias=“cn” fallback-src=“https://assets-cdn.github.com/images/icons/emoji/unicode/1f1e8-1f1f3.png”>🇨🇳</g-emoji> <g-emoji class=“g-emoji” alias=“taiwan” fallback-src=“https://assets-cdn.github.com/images/icons/emoji/unicode/1f1f9-1f1fc.png”>🇹🇼</g-emoji> <g-emoji class=“g-emoji” alias=“brazil” fallback-src=“https://assets-cdn.github.com/images/icons/emoji/unicode/1f1e7-1f1f7.png”>🇧🇷</g-emoji> <g-emoji class=“g-emoji” alias=“es” fallback-src=“https://assets-cdn.github.com/images/icons/emoji/unicode/1f1ea-1f1f8.png”>🇪🇸</g-emoji> <g-emoji class=“g-emoji” alias=“kr” fallback-src=“https://assets-cdn.github.com/images/icons/emoji/unicode/1f1f0-1f1f7.png”>🇰🇷</g-emoji> <g-emoji class=“g-emoji” alias=“jp” fallback-src=“https://assets-cdn.github.com/images/icons/emoji/unicode/1f1ef-1f1f5.png”>🇯🇵</g-emoji> <g-emoji class=“g-emoji” alias=“ru” fallback-src=“https://assets-cdn.github.com/images/icons/emoji/unicode/1f1f7-1f1fa.png”>🇷🇺</g-emoji> <g-emoji class=“g-emoji” alias=“fr” fallback-src=“https://assets-cdn.github.com/images/icons/emoji/unicode/1f1eb-1f1f7.png”>🇫🇷</g-emoji> <g-emoji class=“g-emoji” alias=“thailand” fallback-src=“https://assets-cdn.github.com/images/icons/emoji/unicode/1f1f9-1f1ed.png”>🇹🇭</g-emoji> <g-emoji class=“g-emoji” alias=“netherlands” fallback-src=“https://assets-cdn.github.com/images/icons/emoji/unicode/1f1f3-1f1f1.png”>🇳🇱</g-emoji> <g-emoji class=“g-emoji” alias=“tr” fallback-src=“https://assets-cdn.github.com/images/icons/emoji/unicode/1f1f9-1f1f7.png”>🇹🇷</g-emoji> <g-emoji class=“g-emoji” alias=“indonesia” fallback-src=“https://assets-cdn.github.com/images/icons/emoji/unicode/1f1ee-1f1e9.png”>🇮🇩</g-emoji> <g-emoji class=“g-emoji” alias=“ukraine” fallback-src=“https://assets-cdn.github.com/images/icons/emoji/unicode/1f1fa-1f1e6.png”>🇺🇦</g-emoji> <g-emoji class=“g-emoji” alias=“czech_republic” fallback-src=“https://assets-cdn.github.com/images/icons/emoji/unicode/1f1e8-1f1ff.png”>🇨🇿</g-emoji> <g-emoji class=“g-emoji” alias=“it” fallback-src=“https://assets-cdn.github.com/images/icons/emoji/unicode/1f1ee-1f1f9.png”>🇮🇹</g-emoji>. View these docs in other languages at electron/i18n.

The Electron framework lets you write cross-platform desktop applications using JavaScript, HTML and CSS. It is based on Node.js and Chromium and is used by the Atom editor and many other apps.

Follow @ElectronJS on Twitter for important announcements.

This project adheres to the Contributor Covenant code of conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to coc@electronjs.org.

Installation

To install prebuilt Electron binaries, use npm. The preferred method is to install Electron as a development dependency in your app:

npm install electron --save-dev [--save-exact]

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 Electron versioning.

For more installation options and troubleshooting tips, see installation.

Quick start & Electron Fiddle

Use Electron Fiddle to build, run, and package small Electron experiments, to see code examples for all of Electron’s APIs, and to try out different versions of Electron. It’s designed to make the start of your journey with Electron easier.

Alternatively, clone and run the 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

Resources for learning Electron

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:

const electron = require('electron')
const proc = require('child_process')

// will print something similar to /Users/maf/.../Electron
console.log(electron)

// spawn Electron
const child = proc.spawn(electron)

Mirrors

Documentation Translations

Find documentation translations in electron/i18n.

Community

Info on reporting bugs, getting help, finding third-party tools and sample apps, and more can be found in the support document.

License

MIT

When using the Electron or other GitHub logos, be sure to follow the GitHub logo guidelines.

本站文章除注明转载外,均为本站原创或编译。欢迎任何形式的转载,但请务必注明出处。

转载请注明:文章转载自 JavaScript中文网 [https://www.javascriptcn.com]

本文地址:https://www.javascriptcn.com/read-40355.html

文章标题:electron

相关文章
electron原来这么简单----打包你的react桌面应用程序
也许你不甘心只写网页,被人叫做“他会写网页”,也许你有项目需求,必须写桌面应用,然而你只会前端,没关系。网上的教程很多,但是很少有能说的浅显易懂的,我尽力将electron打包应用说的清晰明了,希望能你在写自己的应用的时候,感到心中有数。...
2018-04-02
使用 electron 编写一个斗图神器 - 根据关键字搜索表情,一键复制
aidou - 斗图从未如此简单~ 在这个斗图的时代,没有几个表情怕是聊不了天了。为了防止「图穷」的尴尬处境,做了一个表情搜索 app 用法 根据关键字搜索表情 鼠标点击表情一键复制到系统粘贴板 微信/github/etc 都可直接...
2018-02-28
基于 electron-vue 开发的音乐播放器
土狗音乐播放器 https://github.com/SmallRuralDog/electron-vue-music 一个基于 electron-vue 开发的音乐播放器 (持续更新中…欢迎star) 运行 git clone htt...
2018-07-23
开发了一款写作软件(OSX,Windows),附带Electron开发指南
断断续续写了个把月,终于在昨天完成了第一版… 笔落写作 一款帮助网络写手更方便地进行小说创作的PC软件,目前支持 OSX/Windows 名字灵感来自于杜甫的一首诗,前两句是: 《寄李十二白二十韵》 昔年有狂客,号尔谪仙人。 笔落惊...
2018-05-16
Electron开发跨平台构建流程设计
本文为 Electron 开发系列文章,前面的文章见:Electron开发,如何入坑? 这是 Electron 系列文章的第二篇,本文将和大家分享我是怎么去构建自动化的 Electron 开发构建工程的,说白了,就是怎么把敲的代码变成一个用...
2017-12-27
Electron是当下开发桌面App最好的选择
当前浏览器不支持播放音乐或语音,请在微信或其他浏览器中播放 &lt;a id=“qqmusic_home_2811310_0”&gt;长路漫漫伴你闯 林子祥 - 天长地久 &lt;/a&gt; 我觉得大多数程序员可以听一听林子祥的这...
2017-12-31
Electron开发初体验
需求背景 平时总会写markdown,markdown整体语法用起来很方便,但依然有晦涩的地方,比如表格。markdown的表格语法写起来很容易出错,而且每行每列单元格里的内容长短不一编辑器里就很容易乱掉,所以我在写表格时候都是借助Tabl...
2018-03-13
详解Webpack实战之构建 Electron 应用
Electron 可以让你使用开发 Web 的技术去开发跨平台的桌面端应用,由 Github 主导和开源,大家熟悉的 Atom 和 VSCode 编辑器就是使用 Electron 开发的。 Electron 是 Node.js 和 Chro...
2017-12-27
配置|electron+vue+ts+sqlite配置
从编程模型的角度来说,使用声明式语言声明样式和布局,使用功能完备的编程语言编写业务逻辑,算是GUI程序的一种最好的实践了。 最近要写一个个人项目,于是我自然想到使用前端来写界面。通过electron就能使用前端技术开发桌面端程序。它实际上就...
2018-07-07
使用create-react-app 快速创建一个 Electron 桌面应用
Electron简介 React + Electron 搭建一个桌面应用 在 Electron 中, 把 package.json 中设定的 main 脚本的所在进程称为 主进程。 快速体验 # github上有一个 electron-qu...
2018-08-10
回到顶部