Skip to content

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

Notifications You must be signed in to change notification settings

meaku/cli-presenter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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);

About

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

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published