tabletop-generator / server

0 stars 0 forks source link

ttg-server

CI

Development

Prerequisites

Setup

Scripts

These scripts are located in package.json and can be run using npm run <script>.

Workflow

Please follow the GitHub flow for contributions:

  1. Update your local main branch

    Switch to your main branch and pull the latest changes from the remote repository:

    git switch main
    git pull --prune
    • The --prune option removes any references to branches that no longer exist on the remote.
  2. Create a new branch

    Name your branch following the convention issue-number (e.g., issue-1):

    git switch -c <issue-number> main
    • If no issue exists for the change you are making, please create one.
  3. Make your changes

    Start the development server:

    npm run dev
    • If introducing new code, add tests for your changes.
  4. Test your changes

    Run the following checks to ensure everything works as expected:

    npm run lint
    npm run test
    npm run start
    npm run test:integration # Server must be running, so run "npm run start" first
  5. Review your changes

    Check which files have been changed:

    git status
  6. Stage your changes

    Add the relevant files to staging:

    git add <files>
  7. Commit your changes

    Write a meaningful commit message:

    git commit -m "<commit message>"
  8. Push your branch

    Push your changes and set the upstream branch:

    git push -u origin <your-branch-name>
  9. Create a pull request

    Create a pull request on GitHub. Fill in the template and link it to the issue using:

    Fixes #[issue number]

Documentation