2.6 KiB
Contributing
Technologies
- NodeJS v10
- Firebase
Project Setup
-
Create a new Firebase project.
- The project name doesn't really matter, but just name it
monkeytype. - Google Analytics is not necessary.
- The project name doesn't really matter, but just name it
-
Run
firebase loginon your terminal to log in to the same google account as you just used to create the project. -
Git clone this project.
-
Run
npm installin thefunctions/directory -
Compile
public/css/style.scsstopublic/css/style.min.cssas described below -
Rename
.firebaserc_exampleto.firebasercand change the project name of default to the firebase project id you just created.- If
.firebaserc_exampledoes not exist after cloning, create your own with:
{ "projects": { "default": "your-firebase-project-id", } }- Run
firebase projects:listto find your firebase project id.
- If
-
Generate a Firebase Admin private key
- In your Firebase console, go to Project Settings > Service Accounts
- Click "Generate New Private Key"
- Save as
serviceAccountKey.jsonin thefunctions/directory
-
Run
firebase serveto start a local server on port 5000. Use ctrl+c to stop it.- Run
firebase use defaultif you run into any errors for this.
- Run
Standards & Conventions
-
Use a SCSS compiler, and make sure that a
style.min.cssfile is generated in the same directory as thestyle.scss. For VSCode I recommendEasy Sassextension by Wojciech Sura. After installing it, to configure it:- Navigate to the VSCode settings,
Extensionssection and findEasy Sass configuration - Under the
Formatsgroup clickedit in settings.json - Make sure this the code looks like this:
"easysass.formats": [ { "format": "compressed", "extension": ".min.css" } ],This will make sure that only a minified file is generated.
-Finally, using the command palete (
ctrl/cmd + shift + p), use theCompile all SCSS/SASS files in the projectoption. You only need to do this once. After this the files will be compiled on save. - Navigate to the VSCode settings,
-
Install Prettier. Its a code formatter, and it will make sure that we avoid any whitespace or formatting issues when merging code.
Questions
If you run into any problems, let me know on GitHub or Discord in the #development channel.