pyramid-kit

## 安装依赖 yarn

Usage no npm install needed!

<script type="module">
  import pyramidKit from 'https://cdn.skypack.dev/pyramid-kit';
</script>

README

pyramid-kit

安装依赖

yarn

安装 packages 里面的依赖(可选)

npm run bootstrap

编译

全局编译: 在项目根目录下执行 npm run build
单独编译: 在每个包下创建 .fatherrc.ts 文件,并且在包下在执行 npm run build

创建包

1.生成
lerna create 包名

2.添加其他必要文件到包下
tsconfig.json、typings.d.ts、public_api.d.ts

3.创建 src 目录,以及该目录下的 index.ts 文件

4.在项目根目录下的 .fatherrc.ts 中的 pkgs 增加新加的包名

调试

1.在指定包目录下运行
npm link

2.在要调试的项目下运行
npm link @pyramid-kit/包名

包管理

添加模块到包内
lerna add axios --scope=@pyramid-kit/http

添加包的相互依赖
lerna add @pyramid-kit/http --scope=@pyramid-kit/auth

发布

进入每个包运行发布命令

npm publish -access public

用户名密码

先切换到npm官方源: npm config set registry https://registry.npmjs.org/ 登录: npm login 账号:guccihuiyuan 密码:sola-roxas Email:704807396@qq.com

取消发布

npm unpublish @ang-kit/component@0.5.0

文档

使用

1.创建.mdx文件

2.启动预览文档
npm run dev

编写规范,参照 Docz