REPL
Read-Eval-Print-Loop (REPL) is a simple, interactive computer programming environment that takes single user inputs (i.e. single expressions), evaluates them, and returns the result to the user.Read Eval Print Loop(REPL)是一个简单的交互式计算机编程环境,它接受单个用户输入(即单个表达式),对其进行评估,并将结果返回给用户。
Main process主要工艺流程
Electron exposes the Node.js Electron通过repl
module through the --interactive
CLI flag. --interactive CLI
标志公开Node.js repl
模块。Assuming you have 假设您已将electron
installed as a local project dependency, you should be able to access the REPL with the following command:electron
安装为本地项目依赖项,您应该能够使用以下命令访问REPL:
./node_modules/.bin/electron --interactive
Note: electron --interactive
is not available on Windows (see electron/electron#5776 for more details).在Windows上不可用(有关详细信息,请参阅electron/electron#5776)。
Renderer process渲染器进程
You can use the DevTools Console tab to get a REPL for any renderer process. 您可以使用DevTools控制台选项卡获取任何渲染器进程的REPL。To learn more, read the Chrome documentation.要了解更多信息,请阅读Chrome文档。