Files
file-node/readme.md
ashley zomo 832cecfe76 v1.1.0
translated to typescript and added .ts file support
2022-06-14 12:13:28 -05:00

903 B

file-node

an objective improvement to the defualt node repl

features

you can initialize a repl by running a javscript file and using variables from there

installation

  • download the executable version for your os and rename it to file-node (or file-node.exe on windows)
  • put it in a folder in your path

usage

file-node [options] <script.js>

Options:
  -V, --verbose  Verbose output
  -v, --version  Print version
  -h, --help     Show this help message

notes

inside <script.js>, any variables you want to access from the repl must be either global (i.e. no var/let/const, prefixing the variable with global. also works) or exported (i.e. export let a = 'hi')

no await at the top level of the repl

file scope structure

index
  vm
    repl

other files are scope-ambiguous and do not matter

util/version.ts is auto generated