1.0.1 • Published 7 years ago

electron-repl v1.0.1

Weekly downloads
1
License
BSD
Repository
github
Last release
7 years ago

electron-repl

Interactive REPL for debugging Electron programs.

npm travis standard downloads

About

Run an electron program but also attach a REPL to the same context that your code runs in so you can inspect and mess with stuff as your program is running!

This command-line tool is a fork of node-repl by maxogden.

Usage

$ npm i -g electron-repl
$ electron-repl
Usage: electron-repl <filename>

$ electron-repl your-program.js
>

If you have npm@5.2+ installed, you can just do:

$ npx electron-repl your-program.js
>

Example

Suppose we have a program called hello.js that has these contents:

var pizza = 1

If you run electron-repl hello.js you will get a REPL, just like when you run electron.

The difference is that this REPL is running in the same context as your program.

$ electron-repl hello.js
> 1 + 1 // we are in an electron repl
2
> pizza // we can access variables in our program
1
>

Credit

This is a fork of node-repl modified to work with electron. Almost everything in this module was originally created by maxogden and node-repl contributors. Thank you!

License

BSD