- Install nodeJS, npm and yarn
- Clone the repo and run
yarn
to downloadnode_modules
folder - Copy the
env.example
file into.env
at the root directory, Including in the appropriate API keys. Obtain GCal from your own generation of an API key, and ask Admins for Firebase. - run
yarn start
to build the local development build, which is visible on localhost - run
yarn build
to prepare the production build
Install Windows Subsystem for Linux and continue below.
These are some basic development tools you'll need to get started on this project. If you can, do a quick 2 minute read up on what each of them does! It'll help make sense of the steps later on.
-
git
-
NodeJS 10.x.x and npm
- https://github.com/nvm-sh/nvm#installing-and-updating
nvm install 10.13.0
-
yarn
The first steps in the fork and pull request workflow!
-
Fork this repo!
- Look for the "Fork" button on the top right
- Click it!
-
Enable Travis CI on your repo (You'll need this to merge a pull request later on)
- Sign up in with your github account here
- Accept the Authorization of Travis CI. You’ll be redirected to GitHub.
- Click on your profile picture in the top right of your Travis Dashboard, click Settings and then the green Activate button, and select your forked repository..
-
Clone your fork of the repo to your local machine
- replace "USERNAME" with your Github username and run:
git clone https://github.com/USERNAME/usc-website.git
The USC website interacts with the USC Google Calendar and Firebase. These interactions require authentication through some secret API keys.
-
Copy the
env.example
file into.env
in theusc-website/
directorycp .env.example .env
-
Google Calendar
- Create a Google Project from Google cloud console.
- Enable the Google Calendar API from the API library
- Create credentials from Google cloud console
- Copy your freshly minted API key into the
.env
file!
-
Firebase
- Ask admins nicely for an API key.
- Copy the API key into the
.env
file!
For most part, you'll be testing the changes you make on a development server on your local machine (your laptop, PC, etc) and any changes you make will be reflected immediately.
-
Development
yarn start
-
Build
yarn build
- look for good first issues
- fork and pull request workflow
- format of branches:
<name>/<describe-feature-added>
- explore
index.js
,data.js
andEvents.js
to familiarise yourself with the codebase - understand dependency management
- read up on reactstrap documentation
- read up on file structuring in react
- when everything goes wrong - https://ohshitgit.com
- download more ram