-
零配置,只需更改库名称与运行
npm install😉 -
支持全量引入与按需加载
-
使用 RollupJS 打包,并遵循了 Tree-shaking 与 standard convention
-
使用 Jest 进行测试并给出测试覆盖率
-
使用 TypeDoc 生成代码文档
-
自动生成
(*.d.ts)类型文件 -
使用 Commitizen, Conventional changelog 与 Husky (for the git hooks) 来规范 git flow
-
使用 TypeScript 进行开发
-
需要为每一个类或方法进行注释,最小化注释为:方法说明、参数、返回值
-
需要为每一个导出的类或方法编写测试
-
使用
git add与npm run commit来提交代码
- src/index.ts 作为入口文件,应该在这里导出所有方法
-
Fork 该仓库后 Clone 到本地
-
更改项目信息:仓库地址、名称、作者等
-
安装依赖
-
开始开发
-
npm run lint: 使用 tslint 规范代码 -
npm run rm: 移除 dist / docs 目录 -
npm run build: 生成 bundles、.d.ts文件、以及文档 -
npm start: 以 live-reload 模式运行npm run build -
npm run test: 运行测试 -
npm run test:watch: 以 观察模式 运行测试 -
npm run test:prod: lint 代码、运行测试并生成测试文档(包含测试覆盖率) -
npm run commit: 规范化、可交互的代码提交流程,基于 conventional 规范
全量引入:
import awesomeLib from 'awesomeLib'从 dist/lib 按需引入:
import coolFn from 'mylib/dist/lib/coolFn'