Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: commitlint を追加 #11

Merged
merged 8 commits into from
Feb 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env sh

. "$(dirname -- "$0")/_/husky.sh"

bun commitlint --edit "${1}"
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,13 @@ After git clone, run the following command
$ make bs
```

What is being processed by bootstrap is shown below.

- Configuring git commit message templates
- Installation of various tools by mise
- Installation of dependencies by bun
- Installation of husky by bun

### Add template

You can generate code from a template using plop by executing the following command.
Expand Down Expand Up @@ -56,7 +63,7 @@ TBD
Thanks to our wonderful contributors!

<a href="https://github.com/tatsutakein/project-boilerplate/graphs/contributors">
<img src="https://contrib.rocks/image?repo=tatsutakein/project-boilerplate" />
<img src="https://contrib.rocks/image?repo=tatsutakein/project-boilerplate" alt="Contributors" />
</a>

## License
Expand Down
Binary file modified bun.lockb
Binary file not shown.
3 changes: 3 additions & 0 deletions commitlint.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
extends: ['@commitlint/config-conventional']
}
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
"plop": "plop"
},
"devDependencies": {
"@commitlint/cli": "18.6.1",
"@commitlint/config-conventional": "18.6.2",
"husky": "9.0.11",
"plop": "4.0.1"
}
}
36 changes: 36 additions & 0 deletions scripts/bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,42 @@ else
echo "⚠️ mise install: See https://mise.jdx.dev/getting-started.html for installation."
fi

##############################################################################
##
## bun
##
##############################################################################
echo ""
echo "🚀 bun install: Start"
if type bun >/dev/null 2>&1; then
if bun install; then
echo "✅ bun install: Success"
else
echo "🚫 bun install: Failed"
fi
else
echo "⚠️ bun install: Skip bun because it could not be found."
echo "⚠️ bun install: This may be due to the fact that the mise installation has not been completed."
fi

##############################################################################
##
## husky
##
##############################################################################
echo ""
echo "🚀 husky install: Start"
if type bun >/dev/null 2>&1; then
if bun husky; then
echo "✅ husky install: Success"
else
echo "🚫 husky install: Failed"
fi
else
echo "⚠️ husky install: Skip bun because it could not be found."
echo "⚠️ husky install: This may be due to the fact that the mise installation has not been completed."
fi

##############################################################################
##
## Finish
Expand Down
Loading