@aiao/elements-cdk

elements component Dev Kit


Keywords
angular, cypress, ionic, jest, monorepo, nestjs, nx, react, stencil, web-components
License
MIT
Install
npm install @aiao/elements-cdk@0.1.7-alpha.0

Documentation

AIAO

CircleCI codecov Crowdin MIT license FOSSA Status CodeFactor Maintainability Language grade: JavaScript codebeat badge Codacy Badge Quality Gate Status

monorepo 风格代码统一管理、发布一些 npm 库。

Apps

app 介绍
dev-elements-angular angular 集成演示 详情
dev-elements-react react 集成演示 详情
dev-elements-vue vue 3.0 集成演示 详情
dev-lazy-component lazy-component 集成演示 详情
dev-lazy-element lazy-element 集成演示 详情
dev-lazy-module lazy-module 集成演示 详情
dev-nest-angular-universal nest+angular 服务器渲染演示 详情
dev-universal-fastify-engine universal fastify 渲染引擎演示 详情

Libs

版本小于 1 的为内测版本,请谨慎使用。

Elements

Package 介绍 版本 尺寸
@aiao/elements web component npm bundlephobia 详情
@aiao/elements-angular angular 版 npm bundlephobia 详情
@aiao/elements-react react 版 npm bundlephobia 详情
@aiao/elements-cdk component Dev Kit npm bundlephobia 详情

Angular

Package 介绍 版本 尺寸
@aiao/lazy-module 按需加载 angular module npm bundlephobia 详情
@aiao/lazy-element 按需加载 angular element npm bundlephobia 详情
@aiao/lazy-component 按需加载 任意 modulecomponent npm bundlephobia 详情
@aiao/stencil-toolkit stencil 工具集 , 支持 nx npm bundlephobia 详情
@aiao/universal-fastify-engine universal fastify engine npm bundlephobia 详情

Nest

Package 介绍 版本 尺寸
@aiao/nest-angular-universal nest SSR npm bundlephobia 详情

Node

Package 介绍 版本 尺寸
@aiao/leancloud-hash leancloud 密码计算工具 npm bundlephobia 详情

utils

Package 介绍 版本 尺寸
@aiao/color 处理颜色 npm bundlephobia 详情
@aiao/date 处理日期 npm bundlephobia 详情
@aiao/image-storage 线上图片地址生成器 npm bundlephobia 详情
@aiao/random 随机生成工具 npm bundlephobia 详情
@aiao/typeorm-plus 让 typeorm 支持 sequelize 查询 npm bundlephobia 详情
@aiao/url 处理 url npm bundlephobia 详情
@aiao/util 一些小工具 npm bundlephobia 详情

项目结构

结构大部分遵循 Nx 规则。

  • apps 应用目录
  • libs 库目录
  • tools 工具集

安装

  • cypress 下载较慢,请安装前手动下载并配制环境变量 CYPRESS_INSTALL_BINARY=0 跳过下载,更多安装方法
  • 本项目请使用 yarn 作为默认安装方式。并强制 registry 配置为默认值。如果你下载过于缓慢,可以删除 .yarnrc.npmrc 文件来提高安装速度。
yarn

启动服务

启动 lib 服务

部分 lib 有服务

yarn start elements

启动 app 服务

启动 dev-elements-angular 项目

yarn start dev-elements-angular

启动 dev-elements-react 项目

yarn start dev-elements-react

构建项目

所有构建都在根目录 dist 文件夹中

构建所有库

yarn build:libs

单独构建 util

yarn build util --prod

单元测试

部分库需要数据库支持,请自行启动

测试所有库

yarn test

测试 util

yarn test util

E2E 测试所有库

cypress 如果不能正常启动请尝试更高权限

yarn e2e --prod

MacOS 带权限启动

sudo yarn e2e --prod

E2E 测试 dev-elements-react-e2e

yarn e2e dev-elements-react-e2e --prod

构建 App

单独构建 dev-elements-angular

yarn run build dev-elements-angular --prod

贡献

非常欢迎各位小伙伴一起贡献代码,请先查阅贡献指南

License MIT

FOSSA Status