Merge pull request #7449 from amtj/repl-docs

add REPL documentation
This commit is contained in:
Kevin Sawicki 2016-10-06 11:38:48 -07:00 committed by GitHub
commit 4d7050553c
2 changed files with 27 additions and 0 deletions

View file

@ -37,6 +37,7 @@ an issue:
* [Quick Start](tutorial/quick-start.md)
* [Desktop Environment Integration](tutorial/desktop-environment-integration.md)
* [Online/Offline Event Detection](tutorial/online-offline-events.md)
* [REPL](tutorial/repl.md)
## API References

26
docs/tutorial/repl.md Normal file
View file

@ -0,0 +1,26 @@
# 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.
The `repl` module provides a REPL implementation that can be accessed using:
* Assuming you have `electron` or `electron-prebuilt` installed as a local
project dependency:
```sh
./node_modules/.bin/electron --interactive
```
* Assuming you have `electron` or `electron-prebuilt` installed globally:
```sh
electron --interactive
```
This only creates a REPL for the main process. You can use the Console
tab of the Dev Tools to get a REPL for the renderer processes.
**Note:** `electron --interactive` is not available on Windows.
More information can be found in the [Node.js REPL docs](https://nodejs.org/dist/latest/docs/api/repl.html).