Skip to content

Latest commit

 

History

History
128 lines (90 loc) · 2.48 KB

File metadata and controls

128 lines (90 loc) · 2.48 KB

Getting Started

Install pnpm

This repository uses pnpm workspaces. Install pnpm if you haven't already. If you have node installed, you can install pnpm with the following command:

npm install -g pnpm

Setup repository

Clone the repository and checkout the develop branch.

git clone git@github.com:technoidentity/devfractal.git --branch=develop # or
git clone https://github.com/technoidentity/devfractal.git --branch=develop
cd devfractal

Contributing

Create a branch, install dependencies and build libraries:

git checkout -b <your-branch-name>
pnpm install
pnpm build:libs

Branch names should be descriptive. For example, if you are working on issue #123, your branch name could be something like this:

git checkout -b fix-123-login-form-validation

or

git checkout -b feat-123-safer-queries

Your commit messages should be descriptive as well. DO NOT include feat/fix in commit messages. DO NOT mention issue numbers in commit messages. You could mention both in the commit description. Follow the advice from tpope's note on commit messages.

Common commands

Look at the project's package.json "scripts" section to understand what these scripts do.

Build libraries:

pnpm build:libs

In any project, you should be able to run the following commands.

type check your code:

pnpm types:dev

Check lint errors with the following command

pnpm lint

Build a library:

pnpm build

To run app(development server):

pnpm dev

Once you are done with your changes, run the following command to check if your code is ready to be merged and send a PR to the develop branch.

pnpm validate

Your PR should mention the issue number in the description. For example, if you are working on issue #123, your PR description should be something like this:

Fixes #123

<description>
Closes #123

<description>

You must maintain linear history. Please use rebase to incorporate any changes from develop branch before sending a PR.

git checkout develop
git pull
git checkout <my-branch-name>
git rebase develop # fix any rebasing issues
git stash -u
git push -u origin <my-branch-name>
git stash pop

If you already have pushed changes to remote(origin), you might need

git pull --rebase
git push