Skip to content

Commit

Permalink
Migrate from npm to yarn (#261)
Browse files Browse the repository at this point in the history
  • Loading branch information
chromium-52 authored Sep 10, 2023
1 parent 6c4c859 commit 01ffd0a
Show file tree
Hide file tree
Showing 26 changed files with 11,320 additions and 15,858 deletions.
15 changes: 7 additions & 8 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,17 @@ name: build, lint, test

on:
push:
branches: [ master ]
branches: [master]
pull_request:
branches: [ master ]
branches: [master]

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [10.x, 12.x, 14.x, 15.x]
node-version: [16.x, 18.x, 19.x, 20.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
Expand All @@ -25,10 +24,10 @@ jobs:
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm run build --if-present
- run: npm run check
- run: npm run test
- run: yarn install --frozen-lockfile
- run: CI= yarn build --if-present
# - run: yarn check # skip this for now since `yarn check` is deprecated
- run: yarn test

- name: Coveralls
uses: coverallsapp/github-action@master
Expand Down
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,50 +6,50 @@ This is the React.js frontend for Speak for the Trees! See below for help with s

## Setup :wrench:

Use the package manager [npm](https://www.npmjs.com/) to install all the dependencies for our frontend.
Use the package manager [yarn](https://yarnpkg.com/) to install all the dependencies for our frontend.

```bash
npm install
yarn
```

After that, request a GoogleMaps API key in the SFTT Slack channel and put it in the `.env.development.local` file as `REACT_APP_GOOGLE_MAPS_KEY`. Your frontend should now be ready to go! Run `npm start` to check that everything compiles as expected.
After that, request a GoogleMaps API key in the SFTT Slack channel and put it in the `.env.development.local` file as `REACT_APP_GOOGLE_MAPS_KEY`. Your frontend should now be ready to go! Run `yarn start` to check that everything compiles as expected.

## Available Scripts :robot:

In the project directory, you can run:

### `npm start`
### `yarn start`

Runs the app in the development mode. \
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.

The page will reload if you make edits. \
You will also see any lint errors in the console.

### `npm run check`
### `yarn check`

Runs all 4 lint, type check, and test commands below. \
This command is useful to check that your branch will pass all the CI checks and allow you to merge your PR.

### `npm run lint-fix`
### `yarn lint-fix`

To lint and fix your files. \
This is an easy fix for any lint errors you might encounter.

### `npm run prettier-fix`
### `yarn prettier-fix`

To lint and fix your files. \
This is an easy fix for any prettier errors you might encounter.

### `npm run type-check`
### `yarn type-check`

Type checks your code. \
Also run with `npm run check`, but useful if you only want to type-check your changes.
Also run with `yarn check`, but useful if you only want to type-check your changes.

### `npm run test`
### `yarn test`

Runs all unit tests. \
Also run with `npm run check`, but useful if you only want to run the unit tests.
Also run with `yarn check`, but useful if you only want to run the unit tests.

## Code Walkthrough :computer:

Expand Down
Loading

0 comments on commit 01ffd0a

Please sign in to comment.