Skip to content

Latest commit

 

History

History
89 lines (67 loc) · 3.17 KB

CONTRIBUTING.md

File metadata and controls

89 lines (67 loc) · 3.17 KB

Contributing

You want to help? You rock! Now, take a moment to be sure your contributions make sense to everyone else.

Reporting Issues

Found a problem? Want a new feature?

Submitting Pull Requests

Pull requests are the greatest contributions, so be sure they are focused in scope, and do avoid unrelated commits.

  1. To begin, fork this project, clone your fork, and add our upstream.

    # Clone your fork of the repository into the current directory
    git clone https://github.com/<your-username>/quran.com-frontend
    # Navigate to the newly cloned directory
    cd quran.com-frontend
    #Assign the forked repository to a remote call "origin"
    git remote add origin git://github.com/<your-username>/quran.com-frontend.git
    # Assign the original repository to a remote called "upstream"
    git remote add upstream https://github.com/quran/quran.com-frontend
    # Install the tools necessary for development
    npm install
  2. Pull latest changes from "upstream" and push these changes to your "origin"(forked)

    NOTE - This step will repeat every time You plan to contribute

    # Pull latest changes from "upstream" repository
    git pull upstream master
    #Push latest changes to Your "origin" repository
    git push origin master
  3. Create a branch for your feature or fix:

    # Move into a new branch for a feature
    git checkout -b feature/thing
    # Move into a new branch for a fix
    git checkout -b fix/something
  4. Be sure your code follows our practices.

    # Test current code
    npm run test

    Our npm run test tests and watch. Otherwise use npm run test:ci:unit for CI level tests.

    We also have nightwatch function tests. You can install nightwatch globally and can run tests like this:

    nightwatch --test tests/functional/specs/Index_spec.js
    
  5. To create a PR you need to push your branch to the origin(forked) remote and then press some buttons on GitHub:

    # Push a feature branch
    git push -u origin feature/thing
    # Push a fix branch
    git push -u origin fix/something

    This will create the branch on your GitHub project. The -u flag links this branch with the remote one, so that in the future, you can simply type git push origin.

  6. Now open a pull request with a clear title and description.

Sever-side integration

Unless you have the backend API running locally, you will need to update the API_URL, in development.env file, from localhost to api.quran.com. Leave the port number same.

To start the app, run npm run dev which will run both the server and the client (webpack) to compile upon edits. Go to http://localhost:8001 in your browser, not 8000 (that is just the express server).

If you experience an issue, check the contributing guidelines.