electron-repl
Interactive REPL for debugging Electron programs.
Last updated 3 years ago by ungoldman .
BSD · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install electron-repl 
SYNC missed versions from official npm registry.

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

Current Tags

  • 1.0.1                                ...           latest (3 years ago)

2 Versions

  • 1.0.1                                ...           3 years ago
  • 1.0.0                                ...           3 years ago
Maintainers (2)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (1)
Dev Dependencies (3)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |