[ci skip] 📝 translate repl.md

This commit is contained in:
liuderchi 2017-01-04 16:40:53 +08:00
Родитель e65cc8a245
Коммит 02d7203b4f
1 изменённых файлов: 9 добавлений и 11 удалений

Просмотреть файл

@ -1,26 +1,24 @@
# REPL # REPL
Read-Eval-Print-Loop (REPL) is a simple, interactive computer programming 讀取Read-求值Evaluate-輸出Print-循環LoopREPL是一個簡單、
environment that takes single user inputs (i.e. single expressions), evaluates 互動式的程式語言環境,藉由簡單的使用者輸入(例如:簡單的表達式),計算輸入,然後輸出結果給使用者。
them, and returns the result to the user.
The `repl` module provides a REPL implementation that can be accessed using: `repl` 模組實現了 REPL 功能,可以藉由以下的方式存取:
* Assuming you have `electron` or `electron-prebuilt` installed as a local * 假設你已在專案內部安裝了 `electron` 或是 `electron-prebuilt`
project dependency:
```sh ```sh
./node_modules/.bin/electron --interactive ./node_modules/.bin/electron --interactive
``` ```
* Assuming you have `electron` or `electron-prebuilt` installed globally: * 假設你已全域地安裝了 `electron` 或是 `electron-prebuilt`
```sh ```sh
electron --interactive electron --interactive
``` ```
This only creates a REPL for the main process. You can use the Console 以上的指令只會為主行程建立 REPL。
tab of the Dev Tools to get a REPL for the renderer processes. 你可以從開發者工具的主控台分頁來為渲染行程取得一個 REPL。
**Note:** `electron --interactive` is not available on Windows. **註記:** `electron --interactive` 在 Windows 平台上並不適用。
More information can be found in the [Node.js REPL docs](https://nodejs.org/dist/latest/docs/api/repl.html). 在 [Node.js REPL docs](https://nodejs.org/dist/latest/docs/api/repl.html) 裡可以找到更多資訊。