Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
xiaomai-website-ssr-template
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
liguokang
xiaomai-website-ssr-template
Commits
f077e999
Commit
f077e999
authored
Jul 29, 2021
by
liguokang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:
🎨
parent
bca69f4e
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
21 deletions
+23
-21
.commitlintrc.js
+19
-18
.husky/commit-msg
+1
-1
hooks/commit-msg.js
+3
-2
sada.js
+0
-0
No files found.
.commitlintrc.js
View file @
f077e999
...
...
@@ -2,30 +2,31 @@
* @Author: liguokang
* @Date: 2021-07-28 14:33:40
* @LastEditors: liguokang
* @LastEditTime: 2021-07-2
8 21:11:00
* @LastEditTime: 2021-07-2
9 14:03:28
* @Description:
* @Copyrigh: ©2021 杭州杰竞科技有限公司 版权所有
*/
/**
* feat:新增功能
* fix:bug 修复
* docs:文档更新
* style:不影响程序逻辑的代码修改(修改空白字符,格式缩进,补全缺失的分号等,没有改变代码逻辑)
* refactor:重构代码(既没有新增功能,也没有修复 bug)
* perf:性能, 体验优化
* test:新增测试用例或是更新现有测试
* build:主要目的是修改项目构建系统(例如 glup,webpack,rollup 的配置等)的提交
* ci:主要目的是修改项目继续集成流程(例如 Travis,Jenkins,GitLab CI,Circle等)的提交
* chore:不属于以上类型的其他类型,比如构建流程, 依赖管理
* revert:回滚某个更早之前的提交
*/
module
.
exports
=
{
extends
:
[
'@commitlint/config-conventional'
],
rules
:
{
'type-enum'
:
[
2
,
'always'
,
[
'feat'
,
'feat1'
,
'fix'
,
'docs'
,
'style'
,
'refactor'
,
'perf'
,
'test'
,
'chore'
,
'revert'
]],
'subject-full-stop'
:
[
0
,
'never'
],
'subject-case'
:
[
0
,
'never'
],
'type-enum'
:
[
1
,
'always'
,
[
'build'
,
// 构建
'ci'
,
// ci
'chore'
,
// Other changes that don't modify src or test files. 改变构建流程、或者增加依赖库、工具等
'docs'
,
// Adds or alters documentation. 仅仅修改了文档,比如README, CHANGELOG, CONTRIBUTE等等
'feat'
,
// Adds a new feature. 新增feature
'fix'
,
// Solves a bug. 修复bug
'perf'
,
// Improves performance. 优化相关,比如提升性能、体验
'refactor'
,
// Rewrites code without feature, performance or bug changes. 代码重构,没有加新功能或者修复bug
'revert'
,
// Reverts a previous commit. 回滚到上一个版本
'style'
,
// Improves formatting, white-space. 仅仅修改了空格、格式缩进、逗号等等,不改变代码逻辑
'test'
,
// Adds or modifies tests. 测试用例,包括单元测试、集成测试等
],
],
'header-min-length'
:
[
2
,
'always'
,
10
],
'header-max-length'
:
[
2
,
'always'
,
30
],
},
};
.husky/
pre-commit
→
.husky/
commit-msg
View file @
f077e999
#!/bin/sh
.
"
$(
dirname
"
$0
"
)
/_/husky.sh"
node hooks/commit-msg.js
yarn commitlint
--edit
$1
hooks/commit-msg.js
View file @
f077e999
...
...
@@ -4,16 +4,17 @@
* @Author: 吴文洁
* @Date: 2020-06-05 14:59:14
* @LastEditors: liguokang
* @LastEditTime: 2021-07-2
8 11:30:1
5
* @LastEditTime: 2021-07-2
9 13:37:5
5
* @Description:
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
const
fs
=
require
(
'fs'
)
console
.
log
(
process
);
const
[
messageFile
,
commitType
,
]
=
process
.
env
.
HUSKY_GIT_PARAMS
.
split
(
' '
);
]
=
process
.
env
.
$1
.
split
(
' '
);
if
(
commitType
==
null
)
{
const
currentMessage
=
fs
.
readFileSync
(
messageFile
,
'utf8'
);
...
...
sada.js
0 → 100644
View file @
f077e999
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment