From 87092786842ffee6f30f3744e0a0bc6627ba89ec Mon Sep 17 00:00:00 2001 From: Dima Livshits Date: Mon, 13 May 2019 10:44:20 +0300 Subject: [PATCH 1/4] docs: contributing --- CONTRIBUTING.md | 86 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 000000000..db0d87f75 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,86 @@ +# 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.PureCompoent`) + +```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 + +``` +(): +``` + +### 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 + +### 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 From a14a21cd4104bbbc0826be43b0eda0448bf7d8fd Mon Sep 17 00:00:00 2001 From: Anton Golub Date: Thu, 16 May 2019 10:17:48 +0300 Subject: [PATCH 2/4] docs: contribution guide improvements --- CONTRIBUTING.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index db0d87f75..e77046626 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -54,7 +54,7 @@ export class ComponentControl extends React.Component(): ``` @@ -72,6 +72,7 @@ Must be one of the following: * **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 From a617132fba8b054c4e81abfd81b92b1955e50c7a Mon Sep 17 00:00:00 2001 From: Dima Livshits Date: Thu, 16 May 2019 10:31:23 +0300 Subject: [PATCH 3/4] docs: fix typo --- CONTRIBUTING.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e77046626..c1e7d14c5 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -24,7 +24,7 @@ export const Component: React.FC = (props) => ( ) ``` -`ComponentControl` is a React class component (`React.Component`, `React.PureCompoent`) +`ComponentControl` is a React class component (`React.Component`, `React.PureCompoment`) ```jsx export interface ComponentControlProps { @@ -54,7 +54,9 @@ export class ComponentControl extends React.Component(): ``` From f30be5f03f63efdcaa36816e53e312440588f839 Mon Sep 17 00:00:00 2001 From: Dima Livshits Date: Thu, 16 May 2019 10:36:41 +0300 Subject: [PATCH 4/4] docs: add pr guide --- CONTRIBUTING.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c1e7d14c5..398665816 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -87,3 +87,9 @@ 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.