3.0.0 • Published 2 years ago

rrepl v3.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

rrepl

npm build codecov

An improved node REPL with support for configuration.

Usage

npm install -g rrepl
rrepl

or

npx rrepl

Configuration

Add a .noderc file in your home directory. You can also specify a different configuration file with the -c or --config option. The .noderc file should export a function named rrepl which takes a REPLServer instance as its argument. This callback is invoked when rrepl is run, thus configuring your environment.

module.exports.rrepl = (repl) => {
  repl.setPrompt('>> ');
};

See .noderc.example.js as a sample of what you can do with rrepl!

NODE_OPTIONS

You can pass additional arguments to node with the NODE_OPTIONS environment variable. For example, run:

env NODE_OPTIONS="--experimental-repl-await" rrepl

to enable top-level await keyword support.

Programmatic Usage

Furthermore, you can programmatically create a repl with the following:

import { createRepl } from 'rrepl';
// or
const { createRepl } = require('rrepl');

const repl = await createRepl();
3.0.0

2 years ago

2.1.0

3 years ago

2.0.0

3 years ago

1.3.3

3 years ago

1.3.2

3 years ago

1.3.1

3 years ago

1.3.0

4 years ago

1.2.3

4 years ago

1.2.2

4 years ago

1.2.1

4 years ago

1.2.0

4 years ago

1.1.4

4 years ago

1.1.3

5 years ago

1.1.2

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.0

5 years ago