Neurological Phenomenon Multiplexer
Meet npm Pro: unlimited public & private packages + package-based permissions.Learn more »

cli-presenter

0.0.1 • Public • Published

CLI-Presenter

A node-cli presenter based on REPL. Simply pass an array of commands, the context for the eval and your custom repl config.

API

function Presenter(commands, context, replConfig)

Usage

Simply hit RETURN.

  • Pressing RETURN shows the next command
  • Pressing RETURN again, runs the command
  • Pressing RETURN shows the next command

… and so on….

Example

 
var Presenter = require("cli-presenter");
 
function myFunction() {
     console.log("myFunction called");
}
 
var context = {
    myFunction : myFunction
};
 
var commands = [
    "console.log('my cli presentation');",
    "myFunction();"
];
 
var presenterRepl = Presenter(commands, context);
 

Keywords

none

Install

npm i cli-presenter

DownloadsWeekly Downloads

1

Version

0.0.1

License

none

Last publish

Collaborators

  • avatar