translated to typescript and added .ts file support
This commit is contained in:
2022-06-14 12:13:28 -05:00
commit 832cecfe76
15 changed files with 1667 additions and 0 deletions

41
readme.md Normal file
View File

@@ -0,0 +1,41 @@
# 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
```text
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
```text
index
vm
repl
```
other files are scope-ambiguous and do not matter
`util/version.ts` is auto generated