Skip to content
This repository has been archived by the owner on Jun 16, 2021. It is now read-only.

Commit

Permalink
docs: ✏️ add config to README
Browse files Browse the repository at this point in the history
  • Loading branch information
streamich committed Jun 6, 2018
1 parent d80632a commit 021fa4c
Show file tree
Hide file tree
Showing 3 changed files with 107 additions and 23 deletions.
101 changes: 89 additions & 12 deletions README.md
Expand Up @@ -2,30 +2,28 @@

# git-cz

## Usage


##### Without installation
### Without installation

```shell
npx git-cz
```

##### Install globally standalone
### Install globally standalone

```shell
npm install -g git-cz
git-cz
```

##### Install locally with Commitizen
### Install locally with Commitizen

```shell
npm install -g commitizen
npm install --save-dev git-cz
```

and add to `package.json`:
`package.json`:

```json
{
Expand All @@ -37,35 +35,114 @@ and add to `package.json`:
}
```

now run:
run:

```shell
git cz
```

##### Install globally with Commitizen
### Install globally with Commitizen

```shell
npm install -g commitizen git-cz
commitizen init git-cz --save-dev --save-exact
```

now run:
run:

```shell
git cz
```

## Examples
## Example

![](./docs/example.png)


## Custom config

You can provide custom configuration in `changelog.congfig.js` file
in your repo. See [default configuration file](./src/defaults.js) for reference.

in your repo. Below is default config:

```js
module.exports = {
"list": [
"test",
"feat",
"fix",
"chore",
"docs",
"refactor",
"style",
"ci",
"perf"
],
"maxMessageLength": 64,
"minMessageLength": 3,
"questions": [
"type",
"scope",
"subject",
"body",
"breaking",
"issues",
"lerna"
],
"scopes": [],
"types": {
"chore": {
"description": "Build process or auxiliary tool changes",
"emoji": "🤖",
"value": "chore"
},
"ci": {
"description": "CI related changes",
"emoji": "🎡",
"value": "ci"
},
"docs": {
"description": "Documentation only changes",
"emoji": "✏️",
"value": "docs"
},
"feat": {
"description": "A new feature",
"emoji": "🎸",
"value": "feat"
},
"fix": {
"description": "A bug fix",
"emoji": "🐛",
"value": "fix"
},
"perf": {
"description": "A code change that improves performance",
"emoji": "⚡️",
"value": "perf"
},
"refactor": {
"description": "A code change that neither fixes a bug or adds a feature",
"emoji": "💡",
"value": "refactor"
},
"release": {
"description": "Create a release commit",
"emoji": "🏹",
"value": "release"
},
"style": {
"description": "Markup, white-space, formatting, missing semi-colons...",
"emoji": "💄",
"value": "style"
},
"test": {
"description": "Adding missing tests",
"emoji": "💍",
"value": "test"
}
}
};
```

## Commit Message Format

Expand Down
5 changes: 5 additions & 0 deletions build/readme.js
Expand Up @@ -9,3 +9,8 @@ exports.types = () => {

return str;
};

exports.config = () =>
`\`\`\`js
module.exports = ${JSON.stringify(defaults, null, 2)};
\`\`\``;
24 changes: 13 additions & 11 deletions build/readme.md
Expand Up @@ -2,32 +2,30 @@

# git-cz

## Usage


##### Without installation
### Without installation

```shell
npx git-cz
```


##### Install globally standalone
### Install globally standalone

```shell
npm install -g git-cz
git-cz
```


##### Install locally with Commitizen
### Install locally with Commitizen

```shell
npm install -g commitizen
npm install --save-dev git-cz
```

and add to `package.json`:
`package.json`:

```json
{
Expand All @@ -39,36 +37,40 @@ and add to `package.json`:
}
```

now run:
run:

```shell
git cz
```


##### Install globally with Commitizen
### Install globally with Commitizen

```shell
npm install -g commitizen git-cz
commitizen init git-cz --save-dev --save-exact
```

now run:
run:

```shell
git cz
```


## Examples
## Example

![](./docs/example.png)


## Custom config

You can provide custom configuration in `changelog.congfig.js` file
in your repo. See [default configuration file](./src/defaults.js) for reference.
in your repo. Below is default config:

```mmd
return scripts.config();
```


## Commit Message Format
Expand Down

0 comments on commit 021fa4c

Please sign in to comment.