通过包管理器安装:
# Installation with npm
npm install asf-navbar-vue -D
# or with yarn
yarn add asf-navbar-vue -D
在项目中使用:
// --------------- For Pure HTML ---------------------------------
// 用`<script>`标签引入项目文件夹中index.js与vue文件夹
// 即可在html中写入`<asf-navbar></asf-navbar>`
// --------------- For Vue ---------------------------------------
import { VueNavBar } from 'asf-navbar-vue';
// 在`components`内添加`asfNavbar`
// 即可在template中写入`<asf-navbar></asf-navbar>`
// <using example here...>
// --------------- For React -------------------------------------
import { ReactNavBar } from 'asf-navbar-vue';
export default () => {
return (
<div>
<ReactNavBar />
</div>
)
}
# 运行前安装
yarn install
# 调试
yarn serve # this is a shorthand of `yarn serve:vue`
yarn serve:vue # debug vue component
yarn serve:react # debug react component
# 打包
yarn build # build for production mode, see `src/entries/main.ts`
# 代码检测
yarn lint
# 查看生产环境编译设置
yarn inspect
https://gitee.com/asoul-fan/asf-navbar-vue
- 使用 Node.js 14.17.5 官网LTS版本
- 增加从未有过的功能,即新增功能性提交:
<feat>: +提交说明
- 不改变功能,即新增非功能性提交:
<refactor>: +提交说明
- 优化之前的代码,即更新功能性提交:
<update>: +提交说明
- 提交说明可以使用中文
多分支开发遵从 GITFLOW 规范
-
提交前会自动启动Git Hook调用husky +
yarn lint
,若检测到有任何语法错误或typo会阻止提交。 -
为避免全局配置中的邮箱或姓名带有盒信息,请修改全局Git配置或在具体项目根目录下使用以下命令修改Git提交信息
-
git config user.name "xxxx"
git config user.email "xxxxx@xx.xx"
- 变量命名优先遵循eslint+babel自带规范,若无提示,默认使用驼峰命名法(camelCase)
- 请不要随意格式化他人的文件
- 在引入非官方依赖前需要联系负责人确认
- 新人提交的代码需要进行code review