Skip to content
Snippets Groups Projects
Commit fffde8d8 authored by Jure's avatar Jure
Browse files

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
No related branches found
No related tags found
No related merge requests found
...@@ -3,18 +3,18 @@ ...@@ -3,18 +3,18 @@
<h2>The open toolkit for building publishing workflows</h2> <h2>The open toolkit for building publishing workflows</h2>
</div> </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 # Contents
<!-- TOC depthFrom:1 depthTo:6 withLinks:1 updateOnSave:0 orderedList:0 --> <!-- TOC depthFrom:1 depthTo:6 withLinks:1 updateOnSave:0 orderedList:0 -->
- [Overview](#overview) * [Overview](#overview) - [PubSweet packages](#pubsweet-packages)
- [PubSweet packages](#pubsweet-packages) * [Getting started](#getting-started)
- [Getting started](#getting-started) * [Support](#support)
- [Support](#support) * [Credits](#credits)
- [Credits](#credits)
<!-- /TOC --> <!-- /TOC -->
...@@ -26,15 +26,15 @@ It's a modular and flexible framework consisting of a **server** and **client** ...@@ -26,15 +26,15 @@ It's a modular and flexible framework consisting of a **server** and **client**
## PubSweet packages (managed with Lerna) ## PubSweet packages (managed with Lerna)
| package | description | | 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-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-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-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-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-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/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 | | [@pubsweet/db-manager](https://gitlab.coko.foundation/pubsweet/pubsweet/tree/master/packages/db-manager) | utility for managing PubSweet databases |
# Getting started # Getting started
...@@ -42,15 +42,14 @@ The entry-point into PubSweet is the `pubsweet` command-line tool: [pubsweet-cli ...@@ -42,15 +42,14 @@ The entry-point into PubSweet is the `pubsweet` command-line tool: [pubsweet-cli
# Support # 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). * **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.
* **Bug reports and feature requests** belong in the issues of this monorepo.
# Projects using PubSweet # Projects using PubSweet
- [Editoria](https://gitlab.coko.foundation/editoria/editoria) - a book production platform built for University of California Press * [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 * [Xpub](https://gitlab.coko.foundation/xpub/xpub) - a journal publishing platform
# Credits # Credits
......
module.exports = { extends: ['@commitlint/config-conventional'] }
{ {
"lerna": "2.5.1", "lerna": "2.5.1",
"packages": [ "packages": ["packages/*", "packages/components/packages/*"],
"packages/*", "command": {
"packages/components/packages/*" "publish": {
], "conventionalCommits": true
}
},
"version": "independent" "version": "independent"
} }
...@@ -4,8 +4,12 @@ ...@@ -4,8 +4,12 @@
"private": true, "private": true,
"license": "MIT", "license": "MIT",
"devDependencies": { "devDependencies": {
"@commitlint/cli": "^6.0.5",
"@commitlint/config-conventional": "^6.0.4",
"babel-eslint": "^8.0.3", "babel-eslint": "^8.0.3",
"babel-preset-es2015": "^6.24.1", "babel-preset-es2015": "^6.24.1",
"commitizen": "^2.9.6",
"cz-conventional-changelog": "^2.1.0",
"eslint": "^4.13.1", "eslint": "^4.13.1",
"eslint-config-pubsweet": "^0.0.6", "eslint-config-pubsweet": "^0.0.6",
"eslint-plugin-import": "^2.8.0", "eslint-plugin-import": "^2.8.0",
...@@ -30,7 +34,9 @@ ...@@ -30,7 +34,9 @@
"lint": "npm run lint:js && npm run lint:style", "lint": "npm run lint:js && npm run lint:style",
"lint:js": "eslint 'packages/**/*.{js,jsx}'", "lint:js": "eslint 'packages/**/*.{js,jsx}'",
"lint:style": "stylelint 'packages/**/*.{css,scss}'", "lint:style": "stylelint 'packages/**/*.{css,scss}'",
"precommit": "lint-staged" "precommit": "lint-staged",
"cz": "git-cz",
"commitmsg": "commitlint -e $GIT_PARAMS"
}, },
"jest": { "jest": {
"collectCoverage": true, "collectCoverage": true,
...@@ -50,5 +56,14 @@ ...@@ -50,5 +56,14 @@
], ],
"projects": ["packages/*"] "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.
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