Commit fffde8d8 authored by Jure's avatar Jure

chore: add support for conventional commits

Adds commitzen to guide the user when writing a commit messsage. Add validations for commit messages
and validate agains the Angular conventional commits spec.

closes #121
parent 74bde1f3
......@@ -3,18 +3,18 @@
<h2>The open toolkit for building publishing workflows</h2>
</div>
| ![PubSweet home](https://img.shields.io/badge/PubSweet-home-51c1bc.svg?style=flat&colorA=84509d) [![MIT license](https://img.shields.io/badge/license-MIT-e51879.svg)](https://gitlab.coko.foundation/pubsweet/pubsweet/raw/master/LICENSE) [![mattermost](https://img.shields.io/badge/mattermost_chat-coko%2Fpubsweet-blue.svg)](https://mattermost.coko.foundation/coko/channels/pubsweet) |
| :----: |
| ![PubSweet home](https://img.shields.io/badge/PubSweet-home-51c1bc.svg?style=flat&colorA=84509d) [![MIT license](https://img.shields.io/badge/license-MIT-e51879.svg)](https://gitlab.coko.foundation/pubsweet/pubsweet/raw/master/LICENSE) [![mattermost](https://img.shields.io/badge/mattermost_chat-coko%2Fpubsweet-blue.svg)](https://mattermost.coko.foundation/coko/channels/pubsweet) [![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/) |
| :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
# Contents
<!-- TOC depthFrom:1 depthTo:6 withLinks:1 updateOnSave:0 orderedList:0 -->
- [Overview](#overview)
- [PubSweet packages](#pubsweet-packages)
- [Getting started](#getting-started)
- [Support](#support)
- [Credits](#credits)
* [Overview](#overview) - [PubSweet packages](#pubsweet-packages)
* [Getting started](#getting-started)
* [Support](#support)
* [Credits](#credits)
<!-- /TOC -->
......@@ -26,15 +26,15 @@ It's a modular and flexible framework consisting of a **server** and **client**
## PubSweet packages (managed with Lerna)
| package | description |
| :-------- | :-------- |
| [![pubsweet-server](https://img.shields.io/badge/PubSweet-server-51c1bc.svg?style=flat&colorA=84509d) pubsweet-server](https://gitlab.coko.foundation/pubsweet/pubsweet/tree/master/packages/server) | an extensible RESTful API that runs on the server |
| [![pubsweet-client](https://img.shields.io/badge/PubSweet-client-51c1bc.svg?style=flat&colorA=84509d) pubsweet-client](https://gitlab.coko.foundation/pubsweet/pubsweet/tree/master/packages/client) | an extensible frontend app that runs in the browser |
| [![pubsweet-components](https://img.shields.io/badge/PubSweet-components-51c1bc.svg?style=flat&colorA=84509d) pubsweet-components](https://gitlab.coko.foundation/pubsweet/pubsweet/tree/master/packages/components) | components for server and/or client |
| [![pubsweet-cli](https://img.shields.io/badge/PubSweet-CLI-51c1bc.svg?style=flat&colorA=84509d) pubsweet cli](https://gitlab.coko.foundation/pubsweet/pubsweet/tree/master/packages/cli) | a suite of command-line tools for building and managing your platform |
| [pubsweet-theme-plugin](https://gitlab.coko.foundation/pubsweet/pubsweet/tree/master/packages/theme-plugin) | webpack plugin for theme support in PubSweet |
| [@pubsweet/logger](https://gitlab.coko.foundation/pubsweet/pubsweet/tree/master/packages/logger) | logging utility |
| [@pubsweet/db-manager](https://gitlab.coko.foundation/pubsweet/pubsweet/tree/master/packages/db-manager) | utility for managing PubSweet databases |
| package | description |
| :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------- |
| [![pubsweet-server](https://img.shields.io/badge/PubSweet-server-51c1bc.svg?style=flat&colorA=84509d) pubsweet-server](https://gitlab.coko.foundation/pubsweet/pubsweet/tree/master/packages/server) | an extensible RESTful API that runs on the server |
| [![pubsweet-client](https://img.shields.io/badge/PubSweet-client-51c1bc.svg?style=flat&colorA=84509d) pubsweet-client](https://gitlab.coko.foundation/pubsweet/pubsweet/tree/master/packages/client) | an extensible frontend app that runs in the browser |
| [![pubsweet-components](https://img.shields.io/badge/PubSweet-components-51c1bc.svg?style=flat&colorA=84509d) pubsweet-components](https://gitlab.coko.foundation/pubsweet/pubsweet/tree/master/packages/components) | components for server and/or client |
| [![pubsweet-cli](https://img.shields.io/badge/PubSweet-CLI-51c1bc.svg?style=flat&colorA=84509d) pubsweet cli](https://gitlab.coko.foundation/pubsweet/pubsweet/tree/master/packages/cli) | a suite of command-line tools for building and managing your platform |
| [pubsweet-theme-plugin](https://gitlab.coko.foundation/pubsweet/pubsweet/tree/master/packages/theme-plugin) | webpack plugin for theme support in PubSweet |
| [@pubsweet/logger](https://gitlab.coko.foundation/pubsweet/pubsweet/tree/master/packages/logger) | logging utility |
| [@pubsweet/db-manager](https://gitlab.coko.foundation/pubsweet/pubsweet/tree/master/packages/db-manager) | utility for managing PubSweet databases |
# Getting started
......@@ -42,15 +42,14 @@ The entry-point into PubSweet is the `pubsweet` command-line tool: [pubsweet-cli
# Support
- **If you have a general query about PubSweet**, or want to discuss anything with us, come and [chat to us in our Mattermost channel](https://mattermost.coko.foundation/coko/channels/pubsweet).
- **Bug reports and feature requests** belong in the issues of this monorepo.
* **If you have a general query about PubSweet**, or want to discuss anything with us, come and [chat to us in our Mattermost channel](https://mattermost.coko.foundation/coko/channels/pubsweet).
* **Bug reports and feature requests** belong in the issues of this monorepo.
# Projects using PubSweet
- [Editoria](https://gitlab.coko.foundation/editoria/editoria) - a book production platform built for University of California Press
- [Xpub](https://gitlab.coko.foundation/xpub/xpub) - a journal publishing platform
* [Editoria](https://gitlab.coko.foundation/editoria/editoria) - a book production platform built for University of California Press
* [Xpub](https://gitlab.coko.foundation/xpub/xpub) - a journal publishing platform
# Credits
......
module.exports = { extends: ['@commitlint/config-conventional'] }
{
"lerna": "2.5.1",
"packages": [
"packages/*",
"packages/components/packages/*"
],
"packages": ["packages/*", "packages/components/packages/*"],
"command": {
"publish": {
"conventionalCommits": true
}
},
"version": "independent"
}
......@@ -4,8 +4,12 @@
"private": true,
"license": "MIT",
"devDependencies": {
"@commitlint/cli": "^6.0.5",
"@commitlint/config-conventional": "^6.0.4",
"babel-eslint": "^8.0.3",
"babel-preset-es2015": "^6.24.1",
"commitizen": "^2.9.6",
"cz-conventional-changelog": "^2.1.0",
"eslint": "^4.13.1",
"eslint-config-pubsweet": "^0.0.6",
"eslint-plugin-import": "^2.8.0",
......@@ -30,7 +34,9 @@
"lint": "npm run lint:js && npm run lint:style",
"lint:js": "eslint 'packages/**/*.{js,jsx}'",
"lint:style": "stylelint 'packages/**/*.{css,scss}'",
"precommit": "lint-staged"
"precommit": "lint-staged",
"cz": "git-cz",
"commitmsg": "commitlint -e $GIT_PARAMS"
},
"jest": {
"collectCoverage": true,
......@@ -50,5 +56,14 @@
],
"projects": ["packages/*"]
},
"workspaces": ["packages/*", "packages/components/packages/*"]
"workspaces": ["packages/*", "packages/components/packages/*"],
"repository": {
"type": "git",
"url": "https://gitlab.coko.foundation/pubsweet/pubsweet"
},
"config": {
"commitizen": {
"path": "./node_modules/cz-conventional-changelog"
}
}
}
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment