This gist explains how to setup direnv together with tj/n. When a node version isn't available at the moment the envrc file gets loaded the node version will be downloaded automatically. Happy coding! ☕
Use Homebrew to install the direnv tool.
brew install direnvCopy file direnvrc below into ~/.config/direnv/direnvrc for integrating tj/n.
Tip: You can globally git ignore all .envrc files:
echo ".envrc" >> ~/.gitignore# create file
cat <<EOF > .envrc
#!/usr/bin/env bash
# -*- coding: utf-8 -*-
use node $(node -v)
layout node
EOF
# allow file initially
direnv allow