Markdown 语法
记录一些怎么也记不住写法的 Markdown 语法。
记录一些怎么也记不住写法的 Markdown 语法。
此前,已经介绍了《如何从 0 开始,创建一个 Electron 的 App》,每个人就有了一个梦开始的地方。如果想实现一个功能丰富的 App,了解一点基础知识,是非常必要的。比如,Electron 的进程模型。
此前,已经写文章介绍了如何从 0 开始创建 Vue 项目,今天我们来说说,怎么在 Vue 项目中引入 Element Plus。
昨天,撰写了一篇文章,介绍如何 0 基础入门 Vue,算是讲清楚了学习 Vue 的路线图,今天,继续来介绍一些具体的东西。
昨天,我写了一篇文章,介绍如何使用项目模板,构建一个 Electron 项目的脚手架,我发现我自己在本地无法运行成功,出现了错误。1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22✖ Failed to install modules: ["@electron-forge/plugin-vite@^7.2.0","@typescript-eslint/eslint-plugin@^5.0.0","@typescript-eslint/parser@^5.0.0","eslint@^8.0.1","…
With output: Command failed with a non-zero return code (1):
yarn add @electron-forge/plugin-vite@^7.2.0 @typescript-eslint/eslint-plugin@^5.0.0 @typescript-eslint/parser@^5.0.0 eslint@^8.0.1 eslint-plugin-import@^2.25.0…
yarn add v1.22.21
info No lockfile found.
[1/4] Resolving packages...
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
(node:89705) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
error Error: certificate has expired
at TLSSocket.onConnectSecure (node:_tls_wrap:1674:34)
at TLSSocket.emit (node:events:515:28)
at TLSSocket._finishInit (node:_tls_wrap:1085:8)
at ssl.onhandshakedone (node:_tls_wrap:871:12)
(node:89705) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
error Error: certificate has expired
at TLSSocket.onConnectSecure (node:_tls_wrap:1674:34)
at TLSSocket.emit (node:events:515:28)
at TLSSocket._finishInit (node:_tls_wrap:1085:8)
at ssl.onhandshakedone (node:_tls_wrap:871:12)
⚠ Finalizing dependencies
错误内容如上,看着一大段,很吓人的样子,不过可以仔细阅读一下,真正的错误是在第 10 行,Error: certificate has expired
,如果你去网上搜,遇到这个错误怎么办?
Electron 是一个开源的跨平台桌面应用程序开发框架,它允许开发者使用 Web 技术(如 JavaScript、HTML 和 CSS)来构建桌面应用程序。Electron 嵌入了 Chromium(一个开源的 Web 浏览器引擎)和 Node.js(一个运行在服务器端的 JavaScript 运行时环境),使得开发者能够创建既具有现代 Web 应用的丰富交互性,又具备传统桌面应用的功能和性能的应用程序。
程序员每天离不开的 Visual Studio Code,以及团队协作软件 Slack,聊天社区 Discord 的客户端,都是用 Electron 开发的,可能打出来的包会比较大,但是框架周边成熟度,兼容性和开发体验是真的很棒。仍然是现在桌面端跨平台开发的首选技术之一。最近,我就利用 Electron 技术开发了一个博客客户端软件 HexoPress,开源在 GitHub。从 0 开始学习并完整体验了 Electron 开发的各个方面。
本文给大家分享,2024 年,如何从 0 开始创建一个 Electron 项目。
使用 Electron 开发的时候,因为其原理是 Node.js + Chrome 内核,所以在 Chrome 能用的开发工具,在 Electron 开发的时候也可以用,这就带来了很好的开发体验。
这是一个巨大的优势,可以抵销很多 electron 平台的劣势。
有人说,当你开始怀旧的时候,你可能就已经老了。我想,当你整天想着给自己的代码编写单元测试的时候,作为一个程序员,可能你也老了。
从业十多年了,多数情况下,我还是需要编写代码的,但是写了这么多年代码,我觉得,我硬是没有学会怎么写单元测试。至少无法做到在自己的项目里大规模的使用单元测试。