当前位置: 首页 > 文档资料 > Electron 中文文档 >

关于 Electron

优质
小牛编辑
187浏览
2023-12-01

Electron是由Github开发,用HTML,CSS和JavaScript来构建跨平台桌面应用程序的一个开源库。 Electron通过将Chromium和Node.js合并到同一个运行时环境中,并将其打包为Mac,Windows和Linux系统下的应用来实现这一目的。

Electron于2013年作为构建Github上可编程的文本编辑器Atom的框架而被开发出来。这两个项目在2014春季开源。

目前它已成为开源开发者、初创企业和老牌公司常用的开发工具。 看看谁在使用Electron 。

继续往下阅读可以了解Electron的贡献者们和已经发布的版本,或者直接阅读快速开始指引来开始用Electron来构建应用。

About Electron

Electron is an open source library developed by GitHub for building cross-platform desktop applications with HTML, CSS, and JavaScript. Electron accomplishes this by combining Chromium and Node.js into a single runtime and apps can be packaged for Mac, Windows, and Linux.

Electron began in 2013 as the framework on which Atom, GitHub's hackable text editor, would be built. The two were open sourced in the Spring of 2014.

It has since become a popular tool used by open source developers, startups, and established companies. See who is building on Electron.

Read on to learn more about the contributors and releases of Electron or get started building with Electron in the Quick Start Guide.

核心团队和贡献者

Electron由Github上的一支团队和一群活跃的贡献者维护。 有些贡献者是独立开发者,有些则在用Electron构建应用的大型公司里工作。 我们很乐意把贡献频繁的人加入到项目维护者队伍中。 阅读有关为Electron作贡献的更多信息。

Core Team and Contributors

Electron is maintained by a team at GitHub as well as a group of active contributors from the community. Some of the contributors are individuals and some work at larger companies who are developing on Electron. We're happy to add frequent contributors to the project as maintainers. Read more about contributing to Electron.

版本发布

Electron的版本发布相当频繁。每当Chromium、Node.js有重要的bug修复,新API或是版本更新时我们就会发布新版本。

Releases

Electron releases frequently. We release when there are significant bug fixes, new APIs or are updating versions of Chromium or Node.js.

更新依赖项

Electron中Chromium的版本通常会在Chromium发行新的稳定版后的一到两周之内更新,具体时间根据升级所需的工作量而定。

为了使版本更加稳定,Electron通常会在Node.js发布了新版本的一个月之后再更新。

在Electron里,Node.js和Chromium共享同一个V8实例--通常是Chromium在用的版本。大多数情况下这能正常工作但有时候还是需要为Node.js打补丁。

Updating Dependencies

Electron's version of Chromium is usually updated within one or two weeks after a new stable Chromium version is released, depending on the effort involved in the upgrade.

When a new version of Node.js is released, Electron usually waits about a month before upgrading in order to bring in a more stable version.

In Electron, Node.js and Chromium share a single V8 instance—usually the version that Chromium is using. Most of the time this just works but sometimes it means patching Node.js.

版本

从版本2.0开始Electron会 遵循 semver 标准。 对于大多数应用来说, 在使用最新版本的npm情况下, 运行 $ npm install electron 都将会正常工作 。

版本更新过程已明确并详细地描述在我们的 版本控制文档 中。

Versioning

As of version 2.0 Electron follows semver. For most applications, and using any recent version of npm, running $ npm install electron will do the right thing.

The version update process is detailed explicitly in our Versioning Doc.

长期支持

当前并不存在对Electron旧版本的长期支持。 如果现在你使用的Electron版本跑得不错,你就可以一直使用这个版本。 如果你想使用新发布的特性,那就升级到更新的版本。

版本v1.0.0发布了重大的更新。 如果你现在没有在用这个版本,你应该了解更多关于v1.0.0的改变。

LTS

Long term support of older versions of Electron does not currently exist. If your current version of Electron works for you, you can stay on it for as long as you'd like. If you want to make use of new features as they come in you should upgrade to a newer version.

A major update came with version v1.0.0. If you're not yet using this version, you should read more about the v1.0.0 changes.

核心理念

为了保持Electron的小巧 (文件体积) 和可持续性开发 (以防依赖库和API的泛滥) ,Electron限制了所使用的核心项目的数量。

比如Electron只用了Chromium的渲染库而不是其全部组件。 这使得升级Chromium更加容易,但也意味着Electron缺少了Google Chrome里的一些浏览器相关的特性。

添加到Electron的新功能应该主要是原生 API。 如果可以的话,一个功能应该尽可能的成为一个Node.js模块。 参见社区构建的Electron工具。

Core Philosophy

In order to keep Electron small (file size) and sustainable (the spread of dependencies and APIs) the project limits the scope of the core project.

For instance, Electron uses Chromium's rendering library rather than all of Chromium. This makes it easier to upgrade Chromium but also means some browser features found in Google Chrome do not exist in Electron.

New features added to Electron should primarily be native APIs. If a feature can be its own Node.js module, it probably should be. See the Electron tools built by the community.

历史

下面是 Electron 发展历程中的里程碑。

2013年4月Atom Shell 项目启动 。
2014年5月Atom Shell 被开源 。
2015年4月Atom Shell 被重命名为 Electron 。
2016年5月Electron 发布了 v1.0.0 版本 。
2016年5月Electron 构建的应用程序可上架 Mac App Store 。
2016年8月Windows Store 支持 Electron 构建的应用程序 。

History

Below are milestones in Electron's history.

April 2013Atom Shell is started .
May 2014Atom Shell is open sourced .
April 2015Atom Shell is re-named Electron .
May 2016Electron releases v1.0.0 .
May 2016Electron apps compatible with Mac App Store .
August 2016Windows Store support for Electron apps .