Skip to content

REPL playground, built instantly from your dependencies

License

Notifications You must be signed in to change notification settings

jakemckown/instant-replay

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Instant REPLay

REPL playground, built instantly from your dependencies


Usage

Command

$ node_modules/.bin/replay [options]

Script

package.json

{
  "scripts": {
    "replay": "replay [options]"
  },
  "dependencies": {
    "faker": "^4.1.0",
    "lodash": "^4.17.12"
  }
}

NPM

$ npm run replay

Yarn

$ yarn replay

Options

Option Alias Description
--version -v Show version number.
--help -h Show help.
--output -o Specify output file, such as replay -o "./path/to/file.js". The default is ./bin/repl.js.

REPL

Run REPL

$ node ./bin/repl.js
>

See available dependencies

> deps
[ 'faker', 'lodash' ]
>

See available devDependencies

> devDeps
[ '' ]
>

Load dependency

> load('faker')
'+faker'
> faker.name.firstName()
'Jake'
>

Load dependency with alias

> load('lodash', '_')
'+_'
> _.add(1, 2)
3
> lodash.add(1, 2)
Thrown:
ReferenceError: lodash is not defined
>

Load Node modules

> load('fs')
'+fs'
> load('path')
'+path'
>

Unload dependencies/modules

> unload('faker', '_', 'fs', 'path')
'-faker, -_, -fs, -path'
>

Exit REPL

> exit
$

or

> quit
$

Installation

NPM

$ npm i -D instant-replay

Yarn

$ yarn add -D instant-replay

About

REPL playground, built instantly from your dependencies

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published