From 1215a7598723053c1fb0c6f2cbcb74bb22657ad7 Mon Sep 17 00:00:00 2001 From: liubinpeng Date: Mon, 21 Dec 2020 18:45:47 +0800 Subject: [PATCH] =?UTF-8?q?docs:=20iTerm2=20=E7=9B=B8=E5=85=B3=E9=97=AE?= =?UTF-8?q?=E9=A2=98=E5=8B=98=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Chapter2 - Web FrontEnd/2.40.md | 10 +++++----- Chapter2 - Web FrontEnd/chapter2.md | 2 +- Chapter7 - Geek Talk/7.10.md | 8 ++++---- SUMMARY.md | 2 +- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Chapter2 - Web FrontEnd/2.40.md b/Chapter2 - Web FrontEnd/2.40.md index 59d1e9c..9638baf 100644 --- a/Chapter2 - Web FrontEnd/2.40.md +++ b/Chapter2 - Web FrontEnd/2.40.md @@ -1,4 +1,4 @@ -# Electron:PC 端多端融合方案 +# “Electron” 一个可圈可点的 PC 多端融合方案 > 每天都要写第二天的 todoList。有一天在写的时候突然想到,为了让自己清楚知道自己需要做啥、做了多少、还剩多少没做,想写一个电脑端程序,在技术选型的时候就选了 Electron。 > @@ -58,7 +58,7 @@ npm install && npm start ``` 简单介绍下 Demo 工程,工程目录如下所示 -![工程目录](https://raw.githubusercontent.com/FantasticLBP/knowledge-kit/master/assets/2020-04-21-Electron-packagejson.png) +![工程目录](https://raw.githubusercontent.com/FantasticLBP/knowledge-kit/master/assets/2020-04-21-electron-packagejson.png) 在终端执行 `npm start` 执行的是 package.json 中的 `scripts` 节点下的 start 命令,也就是 `Electron .`,`.` 代表执行 main.js 中的逻辑。 @@ -395,10 +395,10 @@ Electron 架构和 Chromium 架构类似,也是具有1个主进程和多个渲 ``` - 然后打开浏览器,在地址栏输入 `chrome://inspect` - 点击 `configure`,在弹出的面板中填写需要调试的端口信息 - ![chrome inspect](https://raw.githubusercontent.com/FantasticLBP/knowledge-kit/master/assets/2020-04-21-ElectronChromeInspect.png) +- ![chrome inspect](https://raw.githubusercontent.com/FantasticLBP/knowledge-kit/master/assets/2020-04-21-electronChromeInspect.png) - 重新开启服务 `npm start`,在 chrome inspect 面板的 `Target` 节点中选择需要调试的页面 - 在面板中可以看到主进程执行的 `main.js`。可以加断点进行调试 - ![chrome inspect](https://raw.githubusercontent.com/FantasticLBP/knowledge-kit/master/assets/2020-04-21-Electron-MainProcessInspect.png) + ![chrome inspect](./../assets/2020-04-21-Electron-MainProcessInspect.png) 方法二:利用 VS Code 调试 Electron 主进程。 @@ -789,7 +789,7 @@ app.listen(33855) ## 八、 Electron 应用场景 -业界拿 Electron 做了很多东西,比如大家都在用的 VSCode、Atom、一些翻墙软件的实现、很多大厂的面试软件、一些不是非常注重渲染效率的产品、一些集团内部的开发工具等。Electron 大有可为,有很多想象空间去做一些事情。举几个例子 +业界拿 Electron 做了很多东西,比如大家都在用的 VSCode、Atom、一些工具软件的实现、很多大厂的面试软件、一些不是非常注重渲染效率的产品、一些集团内部的开发工具等。Electron 大有可为,有很多想象空间去做一些事情。举几个例子 ### 1. 字节跳动 diff --git a/Chapter2 - Web FrontEnd/chapter2.md b/Chapter2 - Web FrontEnd/chapter2.md index 14ed877..9f67aeb 100644 --- a/Chapter2 - Web FrontEnd/chapter2.md +++ b/Chapter2 - Web FrontEnd/chapter2.md @@ -41,5 +41,5 @@ * [37、前端工程化与 CI、CD](https://github.com/FantasticLBP/knowledge-kit/blob/master/Chapter2%20-%20Web%20FrontEnd/2.37.md) * [38、npm 改进之工程化](https://github.com/FantasticLBP/knowledge-kit/blob/master/Chapter2%20-%20Web%20FrontEnd/2.38.md) * [39、前端模块化演进之路](https://github.com/FantasticLBP/knowledge-kit/blob/master/Chapter2%20-%20Web%20FrontEnd/2.39.md) - * [40、Electron:PC 端多端融合方案](https://github.com/FantasticLBP/knowledge-kit/blob/master/Chapter2%20-%20Web%20FrontEnd/2.40.md) + * [40、“Electron” 一个可圈可点的 PC 多端融合方案](https://github.com/FantasticLBP/knowledge-kit/blob/master/Chapter2%20-%20Web%20FrontEnd/2.40.md) * [41、sourceMap 闪亮登场](https://github.com/FantasticLBP/knowledge-kit/blob/master/Chapter2%20-%20Web%20FrontEnd/2.41.md) \ No newline at end of file diff --git a/Chapter7 - Geek Talk/7.10.md b/Chapter7 - Geek Talk/7.10.md index d47ab79..80b2e15 100644 --- a/Chapter7 - Geek Talk/7.10.md +++ b/Chapter7 - Geek Talk/7.10.md @@ -17,7 +17,7 @@ brew cask install qlcolorcode betterzipql qlimagesize qlmarkdown 具体的配置网上一大堆。贴一个本人亲身操刀操作过的[教程](https://www.jianshu.com/p/7de00c73a2bb) -程序员经常与终端操作打交道,所以很多命令便是做成了命令行模式,在自带的 Terminal 命令都保存在 `.bash_profile` 文件中,使用了 iterm2,命令都保存在 `.zshrc` 中。 +程序员经常与终端操作打交道,所以很多命令便是做成了命令行模式,在自带的 Terminal 命令都保存在 `.bash_profile` 文件中,使用了 iterm2 配套使用的是 `Oh my zsh`,这种情况下命令都保存在 `.zshrc` 中。 所以我们将很多命令保存且编辑。这里也是分享出我个人常用的配置。不断更新,喜欢的同学可以拿去直接使用 @@ -134,7 +134,7 @@ alias python3='/usr/local/Cellar/python/3.7.4/bin/python3' alias disableHomebrewUpdate="export HOMEBREW_NO_AUTO_UPDATE=true" -# 终端翻墙相关的设置(开关开启后稍微有点延迟) +# 终端科学上网相关的设置(开关开启后稍微有点延迟) function proxy_off(){ unset ALL_PROXY @@ -301,7 +301,7 @@ export HOMEBREW_NO_AUTO_UPDATE=true 强烈安利一个我用过最快速、最便宜也就是性价比最高的科学上网工具。[链接](https://su.ybutech.com/aff.php?aff=362) 个人使用的也就是一年120元不到,一个月 60G 流量足够了,打开一些网站秒开。 -另外很多开发都需要终端下载一些资源,但是终端走的通道和浏览器不一样,所以浏览器可以翻墙,终端还是不可以,所以可以在 `.zshrc` 或者 `.bash_profile` 下加下面的脚本 +另外很多开发都需要终端下载一些资源,但是终端走的通道和浏览器不一样,所以浏览器可以科学上网,终端还是不可以,所以可以在 `.zshrc` 或者 `.bash_profile` 下加下面的脚本 ```shell function proxy_off(){ @@ -315,7 +315,7 @@ function proxy_on(){ } ``` -使用 proxy_on 开启终端翻墙模式、proxy_off 关闭终端翻墙模式。 +使用 proxy_on 开启终端科学上网模式、proxy_off 关闭终端科学上网模式。 diff --git a/SUMMARY.md b/SUMMARY.md index 00f0953..36e8c28 100644 --- a/SUMMARY.md +++ b/SUMMARY.md @@ -138,7 +138,7 @@ * [37、前端工程化与 CI、CD](https://github.com/FantasticLBP/knowledge-kit/blob/master/Chapter2%20-%20Web%20FrontEnd/2.37.md) * [38、npm 改进之工程化](https://github.com/FantasticLBP/knowledge-kit/blob/master/Chapter2%20-%20Web%20FrontEnd/2.38.md) * [39、前端模块化演进之路](https://github.com/FantasticLBP/knowledge-kit/blob/master/Chapter2%20-%20Web%20FrontEnd/2.39.md) - * [40、Electron:PC 端多端融合方案](https://github.com/FantasticLBP/knowledge-kit/blob/master/Chapter2%20-%20Web%20FrontEnd/2.40.md) + * [40、“Electron” 一个可圈可点的 PC 多端融合方案](https://github.com/FantasticLBP/knowledge-kit/blob/master/Chapter2%20-%20Web%20FrontEnd/2.40.md) * [41、sourceMap 闪亮登场](https://github.com/FantasticLBP/knowledge-kit/blob/master/Chapter2%20-%20Web%20FrontEnd/2.41.md) * [Chapter3 - Server](https://github.com/FantasticLBP/knowledge-kit/blob/master/Chapter3%20-%20Server/chapter3.md)