Skip to content

Commit e9ee875

Browse files
committed
chore: add husky
chore: add commit message template
1 parent d9d5ddf commit e9ee875

File tree

6 files changed

+119
-13
lines changed

6 files changed

+119
-13
lines changed

.gitmessage.txt

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Conventional Commit template
2+
# Lines starting with # are ignored by Git.
3+
# Keep header ≤72 chars; subject in imperative mood.
4+
# Examples of <type>: feat, fix, docs, style, refactor, perf, test, build, ci, chore, revert
5+
6+
<type>(<scope>): <subject>
7+
8+
# Why?
9+
# - What problem does this change solve?
10+
# - Why now / context?
11+
12+
# What changed?
13+
# - Key changes, trade-offs, alternatives considered
14+
# - Any user-facing behavior changes
15+
16+
# How was it tested?
17+
# - Test strategy, manual steps, screenshots if relevant
18+
19+
# Notes
20+
# - Known limitations, follow-ups, migrations
21+
22+
# Footer (one per line)
23+
# BREAKING CHANGE: <describe the breaking change and migration path>
24+
# Closes #123
25+
# Relates-to #456
26+
# Co-authored-by: Name <email>

.husky/commit-msg

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1 @@
1-
#!/usr/bin/env sh
2-
. "$(dirname "$0")/_/husky.sh"
3-
41
npx commitlint --edit "$1"

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
20.19.4

Dockerfile

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,10 @@ ARG XDEBUG_VERSION="xdebug-3.3.2"
77
ENV COMPOSER_ALLOW_SUPERUSER=1
88
ENV GITHUB_OAUTH_TOKEN=$GITHUB_OAUTH_TOKEN
99
ENV PHP_DIR /usr/local/etc/php
10+
ARG YARN_VERSION="1.22.22"
11+
ARG NVM_VERSION="v0.40.3"
12+
ARG NODE_VERSION="20.19.4"
1013

11-
ARG NVM_VERSION="v0.39.7"
12-
ARG NODE_VERSION="18.20.2"
1314
# base packages
1415
RUN apt-get update
1516
RUN apt-get install -y \
@@ -33,16 +34,18 @@ RUN apt-get install -y \
3334
libmagickwand-dev
3435

3536

36-
# nvm
3737

3838
# nvm + node + yarn via corepack
3939
ENV NVM_DIR=/root/.nvm
4040
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/$NVM_VERSION/install.sh | bash
4141
# Install Node, enable Corepack (Yarn)
42-
RUN bash -lc "source $NVM_DIR/nvm.sh && nvm install $NODE_VERSION && corepack enable && corepack prepare yarn@stable --activate"
43-
42+
RUN bash -lc "source $NVM_DIR/nvm.sh && nvm install $NODE_VERSION && corepack enable && corepack prepare yarn@$YARN_VERSION --activate"
4443
RUN apt clean && rm -rf /var/lib/apt/lists/*
4544

45+
# Set up our PATH correctly so we don't have to long-reference npm, node, &c.
46+
ENV NODE_PATH=$NVM_DIR/versions/node/v$NODE_VERSION/lib/node_modules
47+
ENV PATH=$NVM_DIR/versions/node/v$NODE_VERSION/bin:$PATH
48+
4649
ADD --chmod=0755 https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/
4750

4851
RUN install-php-extensions bcmath exif gettext gd imagick mbstring openssl pcntl pdo pdo_mysql sockets ${XDEBUG_VERSION} zip apcu redis igbinary

package.json

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,12 @@
33
"scripts": {
44
"prod": "gulp --production",
55
"dev": "gulp watch",
6-
"prepare": "husky"
6+
"prepare": "husky",
7+
"postinstall":"git config --local commit.template .gitmessage.txt || true"
78
},
89
"devDependencies": {
9-
"gulp": "^3.9.1",
10-
"laravel-elixir": "^5.0.0",
11-
"bootstrap-sass": "^3.3.0",
1210
"@commitlint/config-conventional": "^19.8.1",
1311
"husky": "^9.0.11"
14-
}
12+
},
13+
"packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
1514
}

yarn.lock

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
2+
# yarn lockfile v1
3+
4+
5+
"@commitlint/config-conventional@^19.8.1":
6+
version "19.8.1"
7+
resolved "https://registry.yarnpkg.com/@commitlint/config-conventional/-/config-conventional-19.8.1.tgz#eab42df58cda44f18410ae0cbd6785ece00f214b"
8+
integrity sha512-/AZHJL6F6B/G959CsMAzrPKKZjeEiAVifRyEwXxcT6qtqbPwGw+iQxmNS+Bu+i09OCtdNRW6pNpBvgPrtMr9EQ==
9+
dependencies:
10+
"@commitlint/types" "^19.8.1"
11+
conventional-changelog-conventionalcommits "^7.0.2"
12+
13+
"@commitlint/types@^19.8.1":
14+
version "19.8.1"
15+
resolved "https://registry.yarnpkg.com/@commitlint/types/-/types-19.8.1.tgz#7971fbd56b0cfb31692a4e1941b74ac8217c44e5"
16+
integrity sha512-/yCrWGCoA1SVKOks25EGadP9Pnj0oAIHGpl2wH2M2Y46dPM2ueb8wyCVOD7O3WCTkaJ0IkKvzhl1JY7+uCT2Dw==
17+
dependencies:
18+
"@types/conventional-commits-parser" "^5.0.0"
19+
chalk "^5.3.0"
20+
21+
"@types/conventional-commits-parser@^5.0.0":
22+
version "5.0.1"
23+
resolved "https://registry.yarnpkg.com/@types/conventional-commits-parser/-/conventional-commits-parser-5.0.1.tgz#8cb81cf170853496cbc501a3b32dcf5e46ffb61a"
24+
integrity sha512-7uz5EHdzz2TqoMfV7ee61Egf5y6NkcO4FB/1iCCQnbeiI1F3xzv3vK5dBCXUCLQgGYS+mUeigK1iKQzvED+QnQ==
25+
dependencies:
26+
"@types/node" "*"
27+
28+
"@types/node@*":
29+
version "24.5.2"
30+
resolved "https://registry.yarnpkg.com/@types/node/-/node-24.5.2.tgz#52ceb83f50fe0fcfdfbd2a9fab6db2e9e7ef6446"
31+
integrity sha512-FYxk1I7wPv3K2XBaoyH2cTnocQEu8AOZ60hPbsyukMPLv5/5qr7V1i8PLHdl6Zf87I+xZXFvPCXYjiTFq+YSDQ==
32+
dependencies:
33+
undici-types "~7.12.0"
34+
35+
array-ify@^1.0.0:
36+
version "1.0.0"
37+
resolved "https://registry.yarnpkg.com/array-ify/-/array-ify-1.0.0.tgz#9e528762b4a9066ad163a6962a364418e9626ece"
38+
integrity sha512-c5AMf34bKdvPhQ7tBGhqkgKNUzMr4WUs+WDtC2ZUGOUncbxKMTvqxYctiseW3+L4bA8ec+GcZ6/A/FW4m8ukng==
39+
40+
chalk@^5.3.0:
41+
version "5.6.2"
42+
resolved "https://registry.yarnpkg.com/chalk/-/chalk-5.6.2.tgz#b1238b6e23ea337af71c7f8a295db5af0c158aea"
43+
integrity sha512-7NzBL0rN6fMUW+f7A6Io4h40qQlG+xGmtMxfbnH/K7TAtt8JQWVQK+6g0UXKMeVJoyV5EkkNsErQ8pVD3bLHbA==
44+
45+
compare-func@^2.0.0:
46+
version "2.0.0"
47+
resolved "https://registry.yarnpkg.com/compare-func/-/compare-func-2.0.0.tgz#fb65e75edbddfd2e568554e8b5b05fff7a51fcb3"
48+
integrity sha512-zHig5N+tPWARooBnb0Zx1MFcdfpyJrfTJ3Y5L+IFvUm8rM74hHz66z0gw0x4tijh5CorKkKUCnW82R2vmpeCRA==
49+
dependencies:
50+
array-ify "^1.0.0"
51+
dot-prop "^5.1.0"
52+
53+
conventional-changelog-conventionalcommits@^7.0.2:
54+
version "7.0.2"
55+
resolved "https://registry.yarnpkg.com/conventional-changelog-conventionalcommits/-/conventional-changelog-conventionalcommits-7.0.2.tgz#aa5da0f1b2543094889e8cf7616ebe1a8f5c70d5"
56+
integrity sha512-NKXYmMR/Hr1DevQegFB4MwfM5Vv0m4UIxKZTTYuD98lpTknaZlSRrDOG4X7wIXpGkfsYxZTghUN+Qq+T0YQI7w==
57+
dependencies:
58+
compare-func "^2.0.0"
59+
60+
dot-prop@^5.1.0:
61+
version "5.3.0"
62+
resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-5.3.0.tgz#90ccce708cd9cd82cc4dc8c3ddd9abdd55b20e88"
63+
integrity sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q==
64+
dependencies:
65+
is-obj "^2.0.0"
66+
67+
husky@^9.0.11:
68+
version "9.1.7"
69+
resolved "https://registry.yarnpkg.com/husky/-/husky-9.1.7.tgz#d46a38035d101b46a70456a850ff4201344c0b2d"
70+
integrity sha512-5gs5ytaNjBrh5Ow3zrvdUUY+0VxIuWVL4i9irt6friV+BqdCfmV11CQTWMiBYWHbXhco+J1kHfTOUkePhCDvMA==
71+
72+
is-obj@^2.0.0:
73+
version "2.0.0"
74+
resolved "https://registry.yarnpkg.com/is-obj/-/is-obj-2.0.0.tgz#473fb05d973705e3fd9620545018ca8e22ef4982"
75+
integrity sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==
76+
77+
undici-types@~7.12.0:
78+
version "7.12.0"
79+
resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-7.12.0.tgz#15c5c7475c2a3ba30659529f5cdb4674b622fafb"
80+
integrity sha512-goOacqME2GYyOZZfb5Lgtu+1IDmAlAEu5xnD3+xTzS10hT0vzpf0SPjkXwAw9Jm+4n/mQGDP3LO8CPbYROeBfQ==

0 commit comments

Comments
 (0)