Skip to content

Commit

Permalink
chore: commitlint and standard version setup
Browse files Browse the repository at this point in the history
  • Loading branch information
westeezy committed Feb 21, 2022
1 parent 2f9d3ea commit 2890e12
Show file tree
Hide file tree
Showing 5 changed files with 62 additions and 42 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ jobs:
with:
useLockFile: false

- name: 👕 Lint commit messages
uses: wagoid/commitlint-github-action@v4

- name: ▶️ Run flow-typed script
run: npm run flow-typed

Expand Down
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx --no -- commitlint --edit "$1"
6 changes: 6 additions & 0 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/* @flow */
/* eslint import/no-commonjs: off */

module.exports = {
extends: [ '@commitlint/config-conventional' ]
};
64 changes: 49 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,53 @@
"webpack": "babel-node --config-file ./node_modules/grumbler-scripts/config/.babelrc-node --plugins=transform-es2015-modules-commonjs ./node_modules/.bin/webpack --display-optimization-bailout --progress",
"test": "npm run lint && npm run flow-typed && npm run flow && npm run karma",
"build": "npm run test && npm run babel && npm run webpack -- $@",
"release": "./publish.sh",
"release:patch": "./publish.sh patch",
"release:minor": "./publish.sh minor",
"release:major": "./publish.sh major",
"clean": "rimraf dist coverage",
"reinstall": "rimraf flow-typed && rimraf node_modules && npm install && flow-typed install",
"debug": "cross-env NODE_ENV=debug",
"changelog": "./node_modules/.bin/auto-changelog"
"prepare": "husky install",
"prerelease": "npm run clean && npm run build && git add dist && git commit -m 'ci: check in dist folder' || echo 'Nothing to distribute'",
"release": "standard-version",
"postrelease": "git push && git push --follow-tags && npm publish"
},
"standard-version": {
"types": [
{
"type": "feat",
"section": "Features"
},
{
"type": "fix",
"section": "Bug Fixes"
},
{
"type": "chore",
"hidden": false
},
{
"type": "docs",
"hidden": false
},
{
"type": "style",
"hidden": false
},
{
"type": "refactor",
"hidden": false
},
{
"type": "perf",
"hidden": false
},
{
"type": "test",
"hidden": false
},
{
"type": "ci",
"hidden": true
}
]
},
"repository": {
"type": "git",
Expand All @@ -47,19 +86,14 @@
"globals.js"
],
"readmeFilename": "README.md",
"auto-changelog": {
"output": "CHANGELOG.md",
"template": "compact",
"unreleased": false,
"commitLimit": 10,
"backfillLimit": 10,
"ignoreCommitPattern": "Dist"
},
"devDependencies": {
"auto-changelog": "^1.11.0",
"@commitlint/cli": "^16.2.1",
"@commitlint/config-conventional": "^16.2.1",
"flow-bin": "0.155.0",
"grumbler-scripts": "^5.0.3",
"mocha": "^4"
"husky": "^7.0.4",
"mocha": "^4",
"standard-version": "^9.3.2"
},
"dependencies": {
"@krakenjs/cross-domain-utils": "^3.0.2",
Expand Down
27 changes: 0 additions & 27 deletions publish.sh

This file was deleted.

0 comments on commit 2890e12

Please sign in to comment.