biteagle-cli
Version:
Biteagle project command line interface.
103 lines (61 loc) • 1.67 kB
Markdown
# 比特鹰命令行界面工具
> Biteagle Command line interface
<img src="https://i.ibb.co/0sbVC3n/2022-06-13-11-40-35.gif" style="zoom: 70%;display: inline-block;" />
## 介绍
将常用的配置集合在一起,通过命令的方式实现在项目中快速导入配置
目前支持一下指令
- add
- help
## Add 指令
### Gitlint
> biteagle add Gitlint
>
> 增加对 git commit message 格式检测的配置文件。
检测依赖于 **Eslint**,如果没有做 Eslint 的配置。那么检测将不会生效
使用该命令的时候,会先检测依赖是否安装。如果没有安装会提示是否需要自动完成依赖的安装。
依赖安装好后,最后会生成配置文件。生成后直接使用即可。
**增加了什么配置**
1. .lintstagedrc.json
```json
{
"*.{js,ts}": [
"eslint --fix"
]
}
```
2. commitlint.config.js
```js
module.exports = {
"extends":[
"@commitlint/config-conventional"
]
}
```
3. package.json
```json
scripts: {
...
+ "prepare": "husky install"
+ "cz": "git-cz"
},
+ "config": {
+ "commitizen": {
+ "path": "cz-conventional-changelog"
+ }
+ }
```
4. husky 两个钩子配置
- commit-msg
```shell
npx commitlint -e
```
- pre-commit
```shell
npx lint-staged
```
### ThemeScss
> biteagle add ThemeScss
>
> 增加基础的主题模块,基于 SCSS
会对项目目录进行检测,优先检测 `SRC` 文件夹,如果存在则在 `SRC` 里面添加配置,否则在根目录添加配置
