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 pnpmClone 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 devfractalCreate a branch, install dependencies and build libraries:
git checkout -b <your-branch-name>
pnpm install
pnpm build:libsBranch 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-validationor
git checkout -b feat-123-safer-queriesYour 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.
Look at the project's package.json "scripts" section to understand what these
scripts do.
Build libraries:
pnpm build:libsIn any project, you should be able to run the following commands.
type check your code:
pnpm types:devCheck lint errors with the following command
pnpm lintBuild a library:
pnpm buildTo run app(development server):
pnpm devOnce 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 validateYour 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 popIf you already have pushed changes to remote(origin), you might need
git pull --rebase
git push