forked from apollographql/apollo-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.envrc
23 lines (20 loc) · 992 Bytes
/
.envrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# This is a configuration file for direnv (https://direnv.net/), a tool that
# allows you to automatically set up environment variables based on the current
# directory. If you install and enable direnv, then this file will ensure that
# `nvm` is installed in your home directory and that the version of Node in
# .nvmrc is selected.
watch_file .nvmrc
local NVM_PATH="$HOME/.nvm/nvm.sh"
if ! [ -f "$NVM_PATH" ]; then
echo "Installing NVM" >&2
curl -o- https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash
fi
. "${NVM_PATH}"
# `nvm use` will set up the environment to use some version matching what we have
# in .nvmrc without talking to the network, assuming that there is any matching
# version already downloaded. If there isn't (eg, you're just getting started, or
# we just did a major version upgrade) then it will fail and `nvm install` will
# download a matching version.
nvm use || nvm install
# Let you run npm-installed binaries without npx.
layout node