mirror of https://github.com/lxndrblz/anatole.git

Alexander Bilz
10.33.2022 7979a18498af2bf652c9ee0accb624890ae8eba0
Merge pull request #325 from alexanderdavide/feature/add-release-it

Add release-it and Conventional Commits compliance
4 files modified
3 files added
3944 ■■■■■ changed files
.commitlintrc.json 3 ●●●●● patch | view | raw | blame | history
.github/CONTRIBUTING.md 2 ●●● patch | view | raw | blame | history
.husky/commit-msg 4 ●●●● patch | view | raw | blame | history
.release-it.json 21 ●●●●● patch | view | raw | blame | history
README.md 2 ●●● patch | view | raw | blame | history
package-lock.json 3900 ●●●●● patch | view | raw | blame | history
package.json 12 ●●●● patch | view | raw | blame | history
.commitlintrc.json
New file
@@ -0,0 +1,3 @@
{
  "extends": ["@commitlint/config-conventional"]
}
.github/CONTRIBUTING.md
@@ -18,7 +18,7 @@
2. Please commit any pull requests against the `master` branch.
3. Use semantic commit messages whenever you commit changes, as these help me understand your contribution better and track your changes. If you are not familiar with semantic commit messages, you can find a good introduction under [this](https://gist.github.com/joshbuchea/6f47e86d2510bce28f8e7f42ae84c716) link. Please refrain from using non-descriptive commit messages or filing large changes as a single commit.
3. Use conventional commit messages whenever you commit changes, as these help me understand your contribution better and track your changes. If you are not familiar with conventional commit messages, you can find a good introduction under [this](https://www.conventionalcommits.org/en/v1.0.0/) link. Please refrain from using non-descriptive commit messages or filing large changes as a single commit. All commits will be checked for conformity using Git Hooks and [Husky](https://github.com/typicode/husky). For setting up Husky in your Anatole project, you will have to run `npm run setup` once. This step will set up all the necessary dependencies and configuration files.
4. When deciding if I merge a pull request, I look at the following things:
.husky/commit-msg
New file
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
npx --no-install commitlint --edit $1
.release-it.json
New file
@@ -0,0 +1,21 @@
{
  "npm": {
    "publish": false
  },
  "git": {
    "commitMessage": "chore: release v${version}",
    "tagName": "v${version}"
  },
  "github": {
    "release": true,
    "releaseName": "v${version}",
    "web": true
  },
  "plugins": {
    "@release-it/conventional-changelog": {
      "header": "# Changelog",
      "infile": "CHANGELOG.md",
      "preset": "conventionalcommits"
    }
  }
}
README.md
@@ -1,4 +1,4 @@
# Anatole Hugo Theme ![LICENSE](https://img.shields.io/badge/license-MIT-blue.svg) [![Netlify Status](https://api.netlify.com/api/v1/badges/1f4f2327-2b3f-428a-8f31-c4f921ebcc44/deploy-status)](https://app.netlify.com/sites/anatole-demo/deploys)
# Anatole Hugo Theme ![LICENSE](https://img.shields.io/badge/license-MIT-blue.svg) [![https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg](https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg)](https://www.conventionalcommits.org/) [![Netlify Status](https://api.netlify.com/api/v1/badges/1f4f2327-2b3f-428a-8f31-c4f921ebcc44/deploy-status)](https://app.netlify.com/sites/anatole-demo/deploys)
Anatole is a beautiful minimalist two-column [hugo](https://gohugo.io/) theme based on farbox-theme-Anatole.
package-lock.json
Diff too large
package.json
@@ -1,11 +1,14 @@
{
  "name": "anatole",
  "version": "1.1.0",
  "version": "1.7.0",
  "description": "Anatole is a beautiful minimalist two-column hugo theme based on farbox-theme-Anatole.",
  "scripts": {
    "build": "hugo --themesDir=../.. --source=exampleSite && shx rm -rf ./resources && shx cp -r ./exampleSite/resources ./resources && shx echo Done building resources.",
    "dev": "hugo serve --themesDir=../.. --source=exampleSite",
    "prettier": "npx prettier --write ."
    "prettier": "npx prettier --write .",
    "prepare": "husky install",
    "release": "release-it",
    "setup": "npm install && npm run prepare"
  },
  "repository": {
    "type": "git",
@@ -25,8 +28,13 @@
  "homepage": "https://github.com/lxndrblz/anatole#readme",
  "dependencies": {},
  "devDependencies": {
    "@commitlint/cli": "^16.2.1",
    "@commitlint/config-conventional": "^16.2.1",
    "@release-it/conventional-changelog": "^4.2.2",
    "husky": "^7.0.4",
    "prettier": "~2.2.1",
    "prettier-plugin-go-template": "^0.0.11-beta.13",
    "release-it": "^14.12.5",
    "shx": "^0.3.4"
  }
}