You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
谢亚昕 b3fc9de5b4 fix -bug 8 months ago
.changeset chork 9 months ago
.github/workflows chork 9 months ago
.vscode dadd ocs 9 months ago
docs chork 9 months ago
internal/tsconfig feat: 增加changeset 9 months ago
packages fix -bug 8 months ago
public init 11 months ago
scripts fix bug 10 months ago
.gitignore fix bug 10 months ago
.npmrc fix bug 10 months ago
.prettierrc init 11 months ago
package.json upgrade deps 9 months ago
pnpm-lock.yaml upgrade deps 9 months ago
pnpm-workspace.yaml init 11 months ago
readme.md 增加一下零碎 9 months ago
vitest.shared.ts chork 9 months ago
vitest.workspace.ts init vitest workspace 11 months ago

readme.md

xyx-utils 🚀

License GitHub Release

模块化的工具库集合,提供跨平台、多场景的实用功能。

功能特性

  • 多模块支持:包含 Core、Node、Vue3 等独立模块
  • 现代化构建:基于 Vite & TypeScript 构建
  • 完善测试:Vitest 单元测试覆盖
  • 模块化架构:使用 PNPM Workspace 管理多包

安装

# 安装核心模块
pnpm add @xyx-utils/core

# 安装Node工具
pnpm add @xyx-utils/node

# 安装Vue3工具
pnpm add @xyx-utils/vue3

模块列表

模块名称 描述 文档地址
@xyx-utils/core 基础工具函数集合 文档
@xyx-utils/node Node.js 运行时工具 文档
@xyx-utils/vue3 Vue3 组件工具库 文档
@xyx-utils/shared 共享类型定义 文档

快速开始

// 使用核心模块
import { formatDate } from '@xyx-utils/core';

const currentDate = new Date();
const formatted = formatDate(currentDate, 'YYYY-MM-DD');
const obj = { a: 1 };

开发指南

开发新模块

  1. 配置路径别名

    • packages/.vitepress/config.ts 添加 startsDirsalias
    • 更新 internal/tsconfig/tsconfig.json 路径别名
    • 修改 vitest.shared.ts 测试配置
  2. 本地调试

    # 使用 yalc 进行本地依赖链接
    yalc add @xyx/core
    

版本管理

使用 Changeset 进行版本控制:

pnpm changeset:add     # 创建变更集
pnpm changeset:version # 版本升级
pnpm release           # 完整发布流程

测试

运行指定模块测试:

pnpm test core

查看测试覆盖率:

pnpm run coverage

贡献

欢迎通过 Issue 和 PR 参与贡献!请先阅读贡献指南

License

MIT © npmrun


📖 完整文档请访问 项目文档