bs-run
v0.0.8
Published
Run BuckleScript compiled ReasonML and OCaml files
Downloads
9
Readme
Easily run .re
and .ml
files directly in your BuckleScript project.
Note that bs-run
does not compile .re
and .ml
files, it will execute yarn build
and will use the BuckleScript compiled files.
Suggested flow to use bs-run
:
npm -g install bs-run
Install VSCode formulahendry.code-runner
(a VS Code extension):
- Edit your vscode user/workspace settings:
"code-runner.executorMapByFileExtension": {
".re": "bs-run",
".ml": "bs-run"
},
for OCaml you might also have to change:
"code-runner.executorMap": {
"ocaml": "bs-run",
},
- Add in
cmd+shift+p
->Preferences: Open Keyboard Shortcuts (JSON)
:
{
"key": "shift+enter",
"command": "code-runner.run",
"when": "editorTextFocus"
}
- While in a
.re
or.ml
file useshift+enter
to run it
Now you can log and test short snippets of your code.