Skip to content

Commit

Permalink
chore: update meta files
Browse files Browse the repository at this point in the history
  • Loading branch information
thetutlage committed May 30, 2020
1 parent 78fc276 commit afb0d63
Show file tree
Hide file tree
Showing 7 changed files with 177 additions and 87 deletions.
70 changes: 70 additions & 0 deletions .github/COMMIT_CONVENTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
## Git Commit Message Convention

> This is adapted from [Angular's commit convention](https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-angular).
Using conventional commit messages, we can automate the process of generating the CHANGELOG file. All commits messages will automatically be validated against the following regex.

``` js
/^(revert: )?(feat|fix|docs|style|refactor|perf|test|workflow|ci|chore|types|build|improvement)((.+))?: .{1,50}/
```

## Commit Message Format
A commit message consists of a **header**, **body** and **footer**. The header has a **type**, **scope** and **subject**:

> The **scope** is optional
```
feat(router): add support for prefix
Prefix makes it easier to append a path to a group of routes
```

1. `feat` is type.
2. `router` is scope and is optional
3. `add support for prefix` is the subject
4. The **body** is followed by a blank line.
5. The optional **footer** can be added after the body, followed by a blank line.

## Types
Only one type can be used at a time and only following types are allowed.

- feat
- fix
- docs
- style
- refactor
- perf
- test
- workflow
- ci
- chore
- types
- build

If a type is `feat`, `fix` or `perf`, then the commit will appear in the CHANGELOG.md file. However if there is any BREAKING CHANGE, the commit will always appear in the changelog.

### Revert
If the commit reverts a previous commit, it should begin with `revert:`, followed by the header of the reverted commit. In the body it should say: `This reverts commit <hash>`., where the hash is the SHA of the commit being reverted.

## Scope
The scope could be anything specifying place of the commit change. For example: `router`, `view`, `querybuilder`, `database`, `model` and so on.

## Subject
The subject contains succinct description of the change:

- use the imperative, present tense: "change" not "changed" nor "changes".
- don't capitalize first letter
- no dot (.) at the end

## Body

Just as in the **subject**, use the imperative, present tense: "change" not "changed" nor "changes".
The body should include the motivation for the change and contrast this with previous behavior.

## Footer

The footer should contain any information about **Breaking Changes** and is also the place to
reference GitHub issues that this commit **Closes**.

**Breaking Changes** should start with the word `BREAKING CHANGE:` with a space or two newlines. The rest of the commit message is then used for this.

2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ _Put an `x` in the boxes that apply_

_Put an `x` in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code._

- [ ] I have read the [CONTRIBUTING](https://github.com/thetutlage/japa/CONTRIBUTING.md) doc
- [ ] I have read the [CONTRIBUTING](https://github.com/thetutlage/japa/blob/master/CONTRIBUTING.md) doc
- [ ] Lint and unit tests pass locally with my changes
- [ ] I have added tests that prove my fix is effective or that my feature works.
- [ ] I have added necessary documentation (if appropriate)
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ build
dist
package-lock.json
docs
shrinkwrap.yaml
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# The MIT License

Copyright 2018 Harminder Virk, contributors
Copyright 2020 Harminder virk, contributors

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

Expand Down
4 changes: 0 additions & 4 deletions japaFile.js

This file was deleted.

166 changes: 93 additions & 73 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 11 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
"build": "npm run compile && typedoc && node bin/postBuild.js",
"lint": "eslint . --ext=.ts",
"release": "np",
"version": "npm run build"
"version": "npm run build",
"prepublishOnly": "npm run build"
},
"repository": {
"type": "git",
Expand Down Expand Up @@ -56,14 +57,14 @@
"doctoc": "^1.4.0",
"eslint": "^7.1.0",
"eslint-plugin-adonis": "^1.0.10",
"husky": "^4.2.5",
"mocha": "^7.2.0",
"mrm": "^2.3.0",
"np": "^6.2.3",
"ts-node": "^8.10.2",
"typedoc": "^0.17.7",
"typedoc-plugin-external-module-name": "^3.1.0",
"typescript": "^3.9.3",
"yorkie": "^2.0.0"
"typescript": "^3.9.3"
},
"config": {
"commitizen": {
Expand All @@ -72,8 +73,7 @@
},
"nyc": {
"exclude": [
"test",
"src/Reporter"
"test"
],
"extension": [
".ts"
Expand All @@ -87,11 +87,14 @@
"test",
"test-runner"
],
"gitHooks": {
"pre-commit": "doctoc README.md --title='## Table of contents' && git add README.md"
},
"np": {
"contents": ".",
"anyBranch": false
},
"husky": {
"hooks": {
"pre-commit": "doctoc README.md --title='## Table of contents' && git add README.md",
"commit-msg": "node ./node_modules/@adonisjs/mrm-preset/validateCommit/conventional/validate.js"
}
}
}

0 comments on commit afb0d63

Please sign in to comment.