From 3238c0088f602b7daf1f5d2243702885f53afd4e Mon Sep 17 00:00:00 2001 From: David O'Regan Date: Fri, 9 Apr 2021 15:46:07 -0400 Subject: [PATCH] Add asdf support --- .tool-versions | 2 ++ README.md | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 .tool-versions diff --git a/.tool-versions b/.tool-versions new file mode 100644 index 00000000..4616a27b --- /dev/null +++ b/.tool-versions @@ -0,0 +1,2 @@ +nodejs 14.15.4 +yarn 1.22.5 \ No newline at end of file diff --git a/README.md b/README.md index 3e998466..14526e1e 100644 --- a/README.md +++ b/README.md @@ -56,6 +56,38 @@ To build and deploy this project, you must install the following packages: - `yarn`: A [package Manager](https://yarnpkg.com/), used to build the project locally. +### Use `asdf` + +To install Node.js, and Yarn using `asdf`: + +1. [Install `asdf`](https://asdf-vm.com/#/core-manage-asdf-vm?id=install). +1. Add the Node.js, and Yarn [`asdf` plugins](https://asdf-vm.com/#/core-manage-plugins) + required to install versions of these dependencies: + + ```shell + asdf plugin add nodejs + asdf plugin add yarn + ``` + +1. [Install](https://asdf-vm.com/#/core-manage-versions) the dependencies listed in the project's + `.tool-versions` file: + + ```shell + asdf install + ``` + +1. Set the installed versions of Node.js, and Yarn to be global for projects that don't use + `.tool-versions` files. For example to set Yarn 1.22.5 as the global default, run: + + ```shell + asdf global yarn 1.22.5 + ``` + +Check your: + +- Node.js version with `node -v`. +- Yarn version with `yarn -v` + ### Project setup ```shell -- GitLab