terminal-in-react-node-eval-plugin

2.0.0 • Public • Published

Node Eval Plugin

Downloads Downloads NPM Version Dependencies Dev Dependencies License

Plugin to add node evaluation and repl to terminal-in-react

Install

npm i -S terminal-in-react-node-eval-plugin
yarn add terminal-in-react-node-eval-plugin

Usage

The plugin requires a file system plugin to work currently terminal-in-react-pseudo-file-system-plugin is the only one available. You have to pass the name of the file system plugin as a config option.

import NodeEvalPlugin from 'terminal-in-react-node-eval-plugin';
import pseudoFileSystemPlugin from 'terminal-in-react-pseudo-file-system-plugin';
const FileSystemPlugin = pseudoFileSystemPlugin();
 
...
<Terminal
  plugins={[
    FileSystemPlugin,
    {
      class: NodeEvalPlugin,
      config: {
        filesystem: FileSystemPlugin.displayName
      }
    }
  ]}
/>
...

Commands

The commands it adds are:

  • node

Plugin public methods

The methods available to other plugins

  • node

TODO

  • Eval files
  • Node repl
  • Eval node requires
  • Run as process (web workers)

Package Sidebar

Install

npm i terminal-in-react-node-eval-plugin

Weekly Downloads

18

Version

2.0.0

License

MIT

Unpacked Size

145 kB

Total Files

8

Last publish

Collaborators

  • jcgertig