Contributing to Factor
Any contribution to Factor is more than welcome. Below we provide some specific technical guidance as well as some philosophy and style guidelines.
- Fork the Factor monorepo to your own account and then clone it to your local device.
yarn installto install the dependencies.
- Factor is running in a Monorepo configuration. Using Yarn Workspaces and Lerna. (Make sure to read about the concepts behind these tools.)
- Run the monorepo (shown below)
- Follow the Github Flow and Feature Branches workflow.
Note that you should be running the latest Yarn utility and Node version 10 or above.
Running Apps Using the Monorepo
If you'd like to try running apps or themes directly from the Factor monorepo that is easy.
First clone it:
git clone https://github.com/fiction-com/factor
And then running a Yarn workspace within the repo. As an example, you can run this site's code with the following command:
yarn workspace @apps/factor factor dev
The typical and recommended way of getting changes made is by making a pull request from a feature branch which includes your changes or fixes.
The workflow looks like this:
- Fork the Factor Monorepo
- Create a new branch for your specific changes (e.g. branch named: fix/some-bug/issue321)
- Create pull request discussing reasons for change
- If you're request is reasonable, then we may request code refactoring via code review or accept your pull request as is.
As you might have noticed already, we are using ESLint to enforce a code standard. Please run
yarn factor lint before committing
your changes to verify that the code style is correct. If not, you can use
yarn factor lint --fix. If there are still errors left, you must correct them manually.
If you are adding a new feature, or changing behavior you'll likely want to document the changes.
Please do so with a change to the docs package inside the Factor repo.
No need to write documentation up immediately but please do so whenever your change is made stable and ready for production.