Skip to content

Commit aefd2f1

Browse files
committed
chore(repo): setup git cz for conventional commits
1 parent e26d79b commit aefd2f1

File tree

3 files changed

+57
-5
lines changed

3 files changed

+57
-5
lines changed

cz.config.js

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/** @type {import('cz-git').UserConfig['prompt']} */
2+
module.exports = {
3+
types: [
4+
{ value: 'feat', name: 'feat: A new feature', emoji: ':sparkles:' },
5+
{ value: 'fix', name: 'fix: A bug fix', emoji: ':bug:' },
6+
{ value: 'docs', name: 'docs: Documentation only changes', emoji: ':memo:' },
7+
{
8+
value: 'refactor',
9+
name: 'refactor: A code change that neither fixes a bug nor adds a feature',
10+
emoji: ':recycle:',
11+
},
12+
{ value: 'perf', name: 'perf: A code change that improves performance', emoji: ':zap:' },
13+
{
14+
value: 'testing',
15+
name: 'testing: Adding missing tests or correcting existing tests',
16+
emoji: ':white_check_mark:',
17+
},
18+
{ value: 'chore', name: "chore: Other changes that don't modify src or test files", emoji: ':hammer:' },
19+
],
20+
scopes: [
21+
{ name: 'core' },
22+
{ name: 'soba' },
23+
{ name: 'cannon' },
24+
{ name: 'postprocessing' },
25+
{ name: 'plugin' },
26+
{ name: 'docs' },
27+
{ name: 'testing' },
28+
],
29+
};

package.json

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,12 @@
33
"version": "0.0.0",
44
"license": "MIT",
55
"scripts": {
6-
"release": "dotenv release-it --",
76
"storybook": "nx storybook soba",
8-
"sandbox": "nx serve sandbox",
9-
"example": "nx serve examples",
107
"generate-json": "node tools/scripts/generate-json.mjs",
118
"generate-soba": "node tools/scripts/generate-soba-json.mjs",
129
"publish": "nx run-many --target=publish --projects=core,soba,postprocessing,cannon --parallel=false",
1310
"publish:beta": "nx run-many --target=publish --projects=core,soba,postprocessing,cannon --parallel=false --tag=beta",
14-
"test": "nx test plugin --test-path-pattern=migrations",
15-
"dev-debug": "nx dev docs"
11+
"commit": "czg"
1612
},
1713
"private": true,
1814
"devDependencies": {
@@ -68,6 +64,8 @@
6864
"@typescript-eslint/utils": "7.17.0",
6965
"autoprefixer": "^10.4.20",
7066
"cypress": "^13.13.2",
67+
"cz-git": "^1.9.4",
68+
"czg": "^1.9.4",
7169
"dotenv-cli": "^7.4.2",
7270
"enquirer": "^2.4.1",
7371
"eslint": "9.8.0",
@@ -159,5 +157,11 @@
159157
"node_modules/angular-three/web-types.json",
160158
"node_modules/angular-three-soba/web-types.json"
161159
],
160+
"config": {
161+
"commitizen": {
162+
"path": "node_modules/cz-git",
163+
"czConfig": "cz.config.js"
164+
}
165+
},
162166
"packageManager": "[email protected]"
163167
}

pnpm-lock.yaml

Lines changed: 19 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)