Merge branch 'feature/global-npm-bin'
This commit is contained in:
commit
a60a4562bf
5 changed files with 41 additions and 36 deletions
16
.github/CONTRIBUTING.md
vendored
16
.github/CONTRIBUTING.md
vendored
|
@ -45,6 +45,22 @@ $ npx gulp dev
|
||||||
|
|
||||||
After debugging, run the command `npx gulp` (without any argument) will automatically output the compressed files to the directory `assets/js/dist/`.
|
After debugging, run the command `npx gulp` (without any argument) will automatically output the compressed files to the directory `assets/js/dist/`.
|
||||||
|
|
||||||
|
## Verify the commit messages
|
||||||
|
|
||||||
|
If you want to make sure your commits pass the CI check, you can refer to the following steps.
|
||||||
|
|
||||||
|
Install `commitlint` & `husky`:
|
||||||
|
|
||||||
|
```console
|
||||||
|
$ npm i -g @commitlint/{cli,config-conventional} husky
|
||||||
|
```
|
||||||
|
|
||||||
|
And then enable `husky`:
|
||||||
|
|
||||||
|
```console
|
||||||
|
$ husky install
|
||||||
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
:tada: Your volunteering will make the open-source world more beautiful, thanks again! :tada:
|
:tada: Your volunteering will make the open-source world more beautiful, thanks again! :tada:
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
. "$(dirname "$0")/_/husky.sh"
|
. "$(dirname "$0")/_/husky.sh"
|
||||||
|
|
||||||
npx --no -- commitlint --edit
|
npx --no -- commitlint -x $(npm root -g)/@commitlint/config-conventional --edit
|
||||||
|
|
20
.versionrc.json
Normal file
20
.versionrc.json
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
{
|
||||||
|
"skip": {
|
||||||
|
"commit": true,
|
||||||
|
"tag": true
|
||||||
|
},
|
||||||
|
"types": [
|
||||||
|
{
|
||||||
|
"type": "feat",
|
||||||
|
"section": "Features"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "fix",
|
||||||
|
"section": "Bug Fixes"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "perf",
|
||||||
|
"section": "Improvements"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
31
package.json
31
package.json
|
@ -12,43 +12,12 @@
|
||||||
"url": "https://github.com/cotes2020/jekyll-theme-chirpy/issues"
|
"url": "https://github.com/cotes2020/jekyll-theme-chirpy/issues"
|
||||||
},
|
},
|
||||||
"homepage": "https://github.com/cotes2020/jekyll-theme-chirpy#readme",
|
"homepage": "https://github.com/cotes2020/jekyll-theme-chirpy#readme",
|
||||||
"scripts": {
|
|
||||||
"prepare": "husky install"
|
|
||||||
},
|
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@commitlint/cli": "^16.2.1",
|
|
||||||
"@commitlint/config-conventional": "^16.2.1",
|
|
||||||
"gulp": "^4.0.2",
|
"gulp": "^4.0.2",
|
||||||
"gulp-concat": "^2.6.1",
|
"gulp-concat": "^2.6.1",
|
||||||
"gulp-insert": "^0.5.0",
|
"gulp-insert": "^0.5.0",
|
||||||
"gulp-rename": "^2.0.0",
|
"gulp-rename": "^2.0.0",
|
||||||
"gulp-uglify": "^3.0.2",
|
"gulp-uglify": "^3.0.2",
|
||||||
"husky": "^7.0.4",
|
|
||||||
"standard-version": "^9.3.2",
|
|
||||||
"uglify-js": "^3.14.3"
|
"uglify-js": "^3.14.3"
|
||||||
},
|
|
||||||
"commitlint": {
|
|
||||||
"extends": [
|
|
||||||
"@commitlint/config-conventional"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"standard-version": {
|
|
||||||
"skip": {
|
|
||||||
"commit": true,
|
|
||||||
"tag": true
|
|
||||||
},
|
|
||||||
"types": [{
|
|
||||||
"type": "feat",
|
|
||||||
"section": "Features"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "fix",
|
|
||||||
"section": "Bug Fixes"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "perf",
|
|
||||||
"section": "Improvements"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
#
|
#
|
||||||
# Usage: run on main branch or the patch branch
|
# Usage: run on main branch or the patch branch
|
||||||
#
|
#
|
||||||
# Requires: Git, Node.js, NPX and RubyGems
|
# Requires: Git, NPM and RubyGems
|
||||||
|
|
||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@ FILES=(
|
||||||
TOOLS=(
|
TOOLS=(
|
||||||
"git"
|
"git"
|
||||||
"npm"
|
"npm"
|
||||||
"npx"
|
"standard-version"
|
||||||
"gem"
|
"gem"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -143,9 +143,9 @@ resume_config() {
|
||||||
# auto-generate a new version number to the file 'package.json'
|
# auto-generate a new version number to the file 'package.json'
|
||||||
standard_version() {
|
standard_version() {
|
||||||
if $opt_pre; then
|
if $opt_pre; then
|
||||||
npx standard-version --prerelease rc
|
standard-version --prerelease rc
|
||||||
else
|
else
|
||||||
npx standard-version
|
standard-version
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue