diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9ce02dbc7..9b16bc7bf 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -5,54 +5,15 @@ - NodeJS v10 - Firebase -## Prerequisite - Firebase Setup +## Prerequisite - Mongo setup -1. [Create a new Firebase project.](https://console.firebase.google.com/u/0/) - - - The project name doesn't really matter, but just name it `monkeytype`. - - Google Analytics is not necessary. - -1. [Install the Firebase CLI](https://firebase.google.com/docs/cli) -1. Run `firebase login` on your terminal to log in to the same google account as you just used to create the project. -1. Git clone this project. -1. Duplicate `.firebaserc_example`, rename the new file to `.firebaserc` and change the project name of default to the firebase project id you just created. - - - If `.firebaserc_example` does not exist after cloning, create your own with: - - ```.firebaserc - { - "projects": { - "default": "your-firebase-project-id" - } - } - ``` - - - Run `firebase projects:list` to find your firebase project id. - -1. Generate a Firebase Admin private key - - - In your Firebase console, go to Project Settings > Service Accounts - - Click "Generate New Private Key" - - Save as `serviceAccountKey.json` in the `functions/` directory - -1. Enable Firebase Authentication - - - In the Firebase console, go to Authentication - - Click on `Email/Password`, enable it and save - - Click on `Google`, add a support email and save - -1. Enable Firebase Firestore - - - In the Firebase console, go to Cloud Firestore - - Create database - - Start in test mode - - Select default location and enable +1. [Install MongoDB: Community Edition](https://docs.mongodb.com/manual/administration/install-community/) +1. Optional: [Install Mongodb Compass](https://www.mongodb.com/products/compass) for easier viewing and manipulation of data ## Building and Running -1. Run `npm install` in the project root directory to install dependencies. +1. Run `npm ci` in the project root directory to install dependencies. 1. Run `npm run start:dev` to start a local dev server on port 5000. It will watch for changes and rebuild when you edit files in `src/` or `public/`. Use ctrl+c to stop it. - - Run `firebase use ` if you run into any errors for this. ## Standards and Conventions diff --git a/src/js/test/test-ui.js b/src/js/test/test-ui.js index ba22f5e10..a02d4700f 100644 --- a/src/js/test/test-ui.js +++ b/src/js/test/test-ui.js @@ -192,7 +192,7 @@ export function screenshot() { $(".pageTest .ssWatermark").addClass("hidden"); $(".pageTest .buttons").removeClass("hidden"); if (revealReplay) $("#resultReplay").removeClass("hidden"); - if (firebase.auth().currentUser == null) + if (DB.currentUser() == null) $(".pageTest .loginTip").removeClass("hidden"); }