To quickly get developing:
- Make sure you have Yarn installed
- Set up an EditorConfig plugin for your text editor
- run
yarn --devto install all development dependencies
Drafter uses ESLint for project linting. ESLint will automatically be
installed when you run yarn --dev. In order to lint your project, run:
$ yarn lint --fixThere are two principal branches, develop, and main. develop is upstream of main, so the
latest changes land there first. However, direct commiting to the develop branch is not allowed.
In order to contribute create a branch from develop as follows:
$ git checkout develop
$ git checkout -b feat-my-new-featureThen, do your work on this branch. Once you are ready, run
$ yarn lint --fixThis will clean up your code and prepare it for merging into develop. Then, open a pull request
from your branch onto develop. The CI will run an action to confirm that your code lints
properly. When this succeeds, squash-merge your code into develop. This will combine all commits
you made into one in order to prevent from polluting the develop commit history.
When you are ready for release, follow the process above to create a PR that bumps the version
in the package.json file to a higher version number. Then, open a pull request
from develop onto main. Do not squash-merge this PR. Instead, use a traditional merge commit.
This will prevent merge conflicts between the two branches and keep a clear record of what
features were added and what changes were made since the previous release. By convention, every
such merge to main is considered a release.
If you wish to deploy, make sure you are on the main branch with
git checkout mainThen run yarn build to build a production-grade version of this project, and deploy that to
hosting services as you see fit.