From a07d3e880f7281b296b3813954bc477e25b31665 Mon Sep 17 00:00:00 2001 From: Tan Yee Jian Date: Sun, 13 Oct 2019 00:22:35 +0800 Subject: [PATCH 1/2] Add links for setting up development environment --- README.md | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 95d31ff..7d71e22 100755 --- a/README.md +++ b/README.md @@ -1,9 +1,18 @@ # USC Website +First time contributing to a project? Check out our [contributing guide](CONTRIBUTING.md)! + ## Development instructions 1. Install node and yarn -2. Clone the repo and run `yarn` -3. Copy the `env.example` file into `.env` at the root directory, -Including in the appropriate API keys. -4. run `yarn start` to start developing. +1. Clone the repo and run `yarn` +1. Create a Firestore database for your own use, using this + [guide](https://firebase.google.com/docs/firestore/quickstart). + You can use test mode and choose a location of your liking, preferably + as close as possible to Singapore. +1. Find your Firestore API key using this + [guide](https://support.google.com/firebase/answer/7015592), + following the instructions for Web App. +1. Copy the `env.example` file into `.env` at the root directory, + Including in the appropriate API keys. +1. Run `yarn start` to start developing. From 88524e7477df63e2dab61deab4f8f4943bc449e8 Mon Sep 17 00:00:00 2001 From: Tan Yee Jian Date: Fri, 22 Nov 2019 15:55:05 +0800 Subject: [PATCH 2/2] Edit readme for development instructions Also edited the .env.example file for more clarity on how to include an API key. Which is without quotes and/or spaces. --- .env.example | 2 ++ README.md | 35 ++++++++++++++++++++++++++++++----- 2 files changed, 32 insertions(+), 5 deletions(-) diff --git a/.env.example b/.env.example index 4fc66b6..54a5c2c 100644 --- a/.env.example +++ b/.env.example @@ -1,5 +1,7 @@ # copy this file into the root directory as .env # replacing the API keys +# Example: +# REACT_APP_FIREBASE_API_KEY=AbCd1234 REACT_APP_FIREBASE_API_KEY= REACT_APP_GCAL_API_KEY= diff --git a/README.md b/README.md index 7d71e22..1e8a993 100755 --- a/README.md +++ b/README.md @@ -4,8 +4,25 @@ First time contributing to a project? Check out our [contributing guide](CONTRIB ## Development instructions -1. Install node and yarn -1. Clone the repo and run `yarn` +If you see code blocks as below, you are supposed to copy them line by line, and run it in a +terminal. To fire up a terminal, Ctrl + Alt + T usually does the job. + +1. Install NodeJS and Yarn, as per the [contributing guide](CONTRIBUTING.md). +1. Check that you have NodeJS 10 and Yarn running. You can use + +```bash +node --version +yarn --version +``` + +1. Clone the repo by and run `yarn`. + +```bash +git clone https://github.com/usdevs/usc-website.git +cd usc-website +yarn # installs all dependencies +``` + 1. Create a Firestore database for your own use, using this [guide](https://firebase.google.com/docs/firestore/quickstart). You can use test mode and choose a location of your liking, preferably @@ -13,6 +30,14 @@ First time contributing to a project? Check out our [contributing guide](CONTRIB 1. Find your Firestore API key using this [guide](https://support.google.com/firebase/answer/7015592), following the instructions for Web App. -1. Copy the `env.example` file into `.env` at the root directory, - Including in the appropriate API keys. -1. Run `yarn start` to start developing. +1. Copy the `.env.example` file into `.env` at the root directory, + +```bash +cp .env.example .env +``` + +Including in the appropriate API keys by using your favourite editor. + +1. Run `yarn start` to start developing! You can now view the USC-Website that is run on your laptop + locally at `localhost:8000`. Note that any changes to the UI and data will NOT affect the real USC Website + so hack away!