Skip to content

Instantly share code, notes, and snippets.

@ronanyeah
Last active December 21, 2016 18:00
Show Gist options
  • Save ronanyeah/c2e17f840083df85fe512deafa6f64e5 to your computer and use it in GitHub Desktop.
Save ronanyeah/c2e17f840083df85fe512deafa6f64e5 to your computer and use it in GitHub Desktop.
supercharge your node repl
#!/bin/bash
# Notes:
# - Requires Node.js to be managed by nvm.
# - Can require packages that are globally or locally installed.
NODE_PATH=$(realpath ${NVM_BIN}/../lib/node_modules) node -e "require(\"/path/to/file.js\")" -i
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment