注:Git for Windows 修改过 MSYS2 的运行环境。未经修改的运行环境不能很好的在 Windows 下互操作,例如 Powershell 中连
git status 都会无法执行。因此在 MSYS2 中安装 Git for Windows 会覆盖原版的 MSYS2 运行环境。
摆脱 SDK
Git for Windows SDK 是一套为了开发 Git for Windows 而存在的环境。把这套 SDK 当 MSYS2 使用会有诸多不便。我只是想把完整的 MSYS 和 Git for Windows 合二为一而已,但在已有的 MSYS2 中安装 Git for Windows SDK 教程中却把 SDK 一同装上了。不装 SDK 其实很简单,不安装 git-extra 包即可。也就是最后一步的命令改为:
pacboy sync git:xgit-doc-html:xgit-doc-man:xcurl:x。
Electron 的 Renderer process 虽然和 main process 是不同的进程,但依然可以使用 node 的环境,比如 require(‘fs’) 之类. 但如果一个 js 脚本是在浏览器环境中用 <script> 标签加载的话,exports 变量是缺的,会报 exports is not defined.