Skip to content

Commit

Permalink
feat: specifying node version (#121)
Browse files Browse the repository at this point in the history
* Added .nvmrc to standardize the Node.js version to the current LTS at any given time.

Currently it's 16.13.2, and it will remain in the 16.x range until support ends in April 2023.

* Testing another build.yml because it appears the documentation lied.

* Fixed typo in build.yml

* Fixed incorrect attribute name in build.yml

* Fixed additional unnecessary changes.

* Fixed requested changes.

* Testing updated build.yml to run Node.js LTS check.

* Testing another build.yml LTS syntax

* The documentation lied again, fixed build.yml.

* Updated build.yml to use LTS version of Node.
  • Loading branch information
8BitRobot authored Jan 24, 2022
1 parent 2c81b45 commit 5490ff5
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ jobs:

strategy:
matrix:
node-version: [14.x, 16.x]
node-version: [16.x, lts/*]

steps:
- name: Checkout Git repo
uses: actions/checkout@v2

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}

Expand Down
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
lts/*
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,18 @@ git clone https://github.com/uclaacm/YOUR_PROJECT_URL_HERE.git
cd YOUR_PROJECT_URL_HERE
```

The instructions to install Node.js will be different based on which platform you're running. It's heavily advised to install your Node.js using NVM (Node Version Manager) because it's easy to manage a standardized version and update it as needed.

### macOS or Linux

Instructions for installing NVM on macOS and Linux (including WSL) are [here](https://github.com/nvm-sh/nvm#installing-and-updating).

At this point you can run `nvm install`. Assuming you've already `cd`ed into the correct directory as mentioned earlier, this will download the LTS (Long-Term Support) version of Node.js for you. Then, run `nvm use` to make sure you've switched to the right version; if it tells you `Now using Node v16` or something similar, you're good to go!

### Windows

If you're on Windows, you can use NVM for Windows, a separate version manager whose installation instructions can be found [here](https://github.com/coreybutler/nvm-windows#installation--upgrades). Once you've done that, you can run `nvm install lts` to install the LTS version of Node.js, and `nvm use lts` to switch to it.

If you don't have yarn installed...

```
Expand Down

0 comments on commit 5490ff5

Please sign in to comment.