nodei
nodei
executes script files and exports global declarations into the REPL.
Supports modules and REPL commands.
Example
foo.js:
var foo = 4; var { return foo;};
nodei repl session:
$ nodei foojs> foo4> 4 /* Change foo.js. */ > reload> foo6
Commands
Command | Description |
---|---|
.reload |
Reload the active JS file |
.load %file% |
Load %file% into REPL, set it as a target for future .reloads |
Yes, built-in .load
is gone.
CLI
nodei [<filename>]
API
nodei([filename], [options])
Start the REPL session, populate it with commands and load filename
.
options
are passed to repl.start
and can override defaults.
Return the REPL instance.
Event: 'load(filename)'
Emitted when file is loaded via .load
or .reload
, or at startup.
Install
npm install nodei -g
License
MIT