GithubHelp home page GithubHelp logo

connect4's Introduction

Connect 4

Getting Started

The following contains the steps required to get the application up and running on your local workspace.

Prerequisites

  • Node v18.17.0
  • yarn v1.22.19
  • Git v2.39.2

Running locally

To run the app locally, follow the steps below:

  1. Clone the repository to your PC using your terminal. For more info, refer to this article.

  2. After cloning, navigate into the repo using the command:

    cd connect4
    
  3. Install the dependencies in the package.json using the command:

    yarn install
    
  4. After the dependencies have been installed successfully, create a .env file at the root. Take a look at the env.sample file and configure your environment variables with your values in the .env file.

  5. After adding the environment variables, run the app in your terminal using the command:

    yarn start
    

Writing Tests

NOTE: All test files should have a .test.ts or .test.tsx file extension.

All tests for a component or utility function should be placed in a __tests__ folder relative to the folder it resides in.

For example, if you had a Header.tsx file located in src/components/Header, and your tests are in a header.test.tsx file, do the following:

  1. Create a __tests__ folder in the src/components/Header folder

  2. Move the header.test.tsx file to the __tests__ folder

The file structure would look similar to this:

.
├── src
│   └── components
|       └── Header
│           ├── Header.tsx
│           └── __tests__
│               └── header.test.tsx

Running Tests

To run tests, run the following command:

yarn test

Git Hooks

  • pre-commit: Automatically formats the codebase using Prettier every time a git commit is made.

  • pre-push: Runs the unit tests when pushing to the remote repository.

connect4's People

Contributors

justsolomon avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.