Skip to content

TheVanguardOfCode/midlands-bg-school

Repository files navigation

Midlands-Bg-School

---- How to Fork&Clone the Repo ----


1 On the GitHub page for this repository, click on the button "Fork".

2 Clone your forked repository to your computer with SSH so you don't use your pass all the time. For example, run this command inside your terminal:

    git clone git@github.com:<your-github-username>/midlands-bg-school.git

Replace !

3 Move to project directory.

    cd <project/directory>

4 Before you make any changes, keep your fork in sync to avoid merge conflicts. ! - RUN THE FIRST COMMAND ONLY ONCE - !

    # Add a new remote upstream repository
    git remote add upstream git@github.com:TheVanguardOfCode/midlands-bg-school.git

    git pull upstream main

    # Sync your fork localy
    git fetch upstream
    git checkout main
    git merge upstream/main
    # Sync your forked repository
    git push

5 After adding the upstream and checking that all files are up to date, we now will create new branch before editing any files. There are two ways to do so:

    git checkout -b <branch-name>
    git branch <branch-name>
    git switch <branch-name>

6 On your computer, open your text editor, and add your name to the README.md file.

    -[@<your-github-username>](https://github.com/<your-github-username>/)

7 Add the changes with git add, git commit (write a good commit message, if possible).

    git add README.md
    git commit -m "<your-message>"

8 Push your changes to your repository.

    git push origin <branch-name>

9 Go to the GitHub page of your fork, and make a pull request.

Contributors

-@MiroslavPopovich -@VentsislavKostadinov -@xelaz98

Formatting

Every time when some change is committed there is a precommit hook to format the files the developer has updated

In case the repository has no formatting from the very beggining it is good to run this command before changing anything:

npx prettier . --write

For this case you need to have prettier globally installed on you computer

npm install -g prettier
npx prettier --write .

Install prettier pre-commit hook for lint staging

npx mrm@2 lint-staged

You can see the official documentation here - https://prettier.io/docs/en/precommit

Compile to ES6 command from ts to js files

npm run build;

Unit testing with Jest

npm test