Skip to content

Commit

Permalink
Create a .nvmrc file so "nvm use" will pick an appropriate node versi…
Browse files Browse the repository at this point in the history
…on (#2835)
  • Loading branch information
dweitzman-codaio authored Nov 30, 2023
1 parent d11d4c2 commit 22987cf
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v18
6 changes: 6 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@ You can then install the other dependencies using the Makefile using the bootstr
make bootstrap
```

To develop on your own computer, make sure you have a compatible version of node installed in your environment. The simplest way to make sure you're using a compatible
version of node is to install [nvm](https://github.com/nvm-sh/nvm#installing-and-updating) and run the following command each time you open a terminal in the packs-sdk repo:

```sh
source setup-env.sh
```

### Preview documentation

Expand Down
6 changes: 6 additions & 0 deletions setup-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,9 @@ if [[ "$(uname -s)" == "Darwin" ]] && [[ "$(arch)" == "arm64" ]]; then
fi

export PATH=${BASEDIR}/build/node/bin:${BASEDIR}/node_modules/.bin:${BASEDIR}/.pnpm_install/bin:${PATH}

if command -v nvm &> /dev/null
then
# Gets version from .nvmrc
nvm use
fi

0 comments on commit 22987cf

Please sign in to comment.