Skip to content

Commit

Permalink
chore: update package
Browse files Browse the repository at this point in the history
  • Loading branch information
BIYUEHU committed Aug 19, 2023
1 parent 88e5539 commit 5b2f097
Show file tree
Hide file tree
Showing 4 changed files with 904 additions and 15 deletions.
26 changes: 24 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
**Last update: 2023-8-19**

> Main Stack: pnpm, eslint, prettier, commitizen, husky, commitlint
> Secondary Stack:Typescript, git, lint-staged
> Secondary Stack:Typescript, git, lint-staged, standard-version
## 1.Initialize project and use pnpm
*Initialize project*:
Expand Down Expand Up @@ -404,7 +404,7 @@ Install Commitlint:

```shell
pnpm install @commitlint/config-conventional @commitlint/cli@12.1.4 -D
npx husky add .husky/commit-msg 'npx --no-install commitlint --edit "$1"'
pnpx husky add .husky/commit-msg 'npx --no-install commitlint --edit "$1"'
```

> .commitlintrc
Expand Down Expand Up @@ -470,3 +470,25 @@ pnpm install lint-staged -D
```shell
pnpx husky add .husky/pre-commit "npx lint-staged"
```

## 4.Auto create CHANGELOG.md and release

Install standard-version

```shell
pnpm install standard-version -D
```

> package.json
```json
{
/* ... */
"scripts": {
/* ... */
"release": "standard-version"
}
/* ... */
}
```

8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@
"test": "echo \"Error: no test specified\" && exit 1",
"lint": "eslint \"src/**/*.{js,vue,ts}\" --fix",
"prettier": "prettier --config .prettierrc \"src/**/*.{vue,js,ts}\" --write",
"prepare": "husky install"
"prepare": "husky install",
"release": "standard-version"
},
"keywords": [],
"author": "",
"author": "Hotaru",
"license": "ISC",
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^6.4.0",
Expand All @@ -22,7 +23,8 @@
"eslint-plugin-import": "^2.28.0",
"eslint-plugin-prettier": "^5.0.0",
"husky": "^8.0.3",
"prettier": "^3.0.2"
"prettier": "^3.0.2",
"standard-version": "^9.5.0"
},
"config": {
"commitizen": {
Expand Down
Loading

0 comments on commit 5b2f097

Please sign in to comment.