diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 000000000..398665816 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,95 @@ +# Contributing to Pijma + +## The idea + +* Render Props +* Primitives Composition + +`Component` is a React function component (`React.FC`) + +Markup of `Component` is composition of primitives (`Box`, `Card`, `Pos`, `Flex`, `FlexItem`, etc.) + +```jsx +export interface ComponentProps { + ... +} + +export const Component: React.FC = (props) => ( + ( + ... + )} + /> +) +``` + +`ComponentControl` is a React class component (`React.Component`, `React.PureCompoment`) + +```jsx +export interface ComponentControlProps { + ... + children: RenderChild<{ + ... + }> +} + +export interface ComponentControlState { + ... +} + +export class ComponentControl extends React.Component { + + public state = { + ... + } + + public render() { + return this.props.children({ + ... + }) + } + +} +``` + +## Commit Message Guidelines + +Relies on [conventional commits](https://www.conventionalcommits.org) contract: + +``` +(): +``` + +### Type + +Must be one of the following: + +* **build**: Changes that affect the build system or external dependencies +* **ci**: Changes to our CI configuration files and scripts +* **docs**: Documentation only changes +* **feat**: A new feature +* **fix**: A bug fix +* **perf**: A code change that improves performance +* **refactor**: A code change that neither fixes a bug nor adds a feature +* **style**: Changes that do not affect the meaning of the code +* **test**: Adding missing tests or correcting existing tests +* **chore**: Routine: releases, tech commits, minor tweak ups, etc. + +### Scope + +The scope should be the name of the npm package affected (as perceived by the person reading the changelog generated from commit messages. + +### Subject + +The subject contains a succinct description of the change: + +* use the imperative, present tense: "change" not "changed" nor "changes" +* don't capitalize the first letter +* no dot (.) at the end + +## Pull Request Guidelines + +Pull Request name must be the same as Commit Message. + +Use [wip](https://github.com/apps/wip) to mark pull request is in progress.