Skip to content

xzsean666/node-utils

Repository files navigation

TypeScript 项目模板

现代化的 TypeScript 项目模板,使用 ESM 模块系统和 Vitest 测试框架。

特性

  • 🚀 ES Modules - 使用原生 ESM 模块系统
  • 📦 TypeScript - 最新的 TypeScript 特性
  • Vitest - 快速的单元测试框架
  • 🔥 tsx - 开发时直接运行 TypeScript
  • 📝 类型声明 - 自动生成 .d.ts 文件

可用的命令

命令 说明
pnpm build 构建项目
pnpm start 运行编译后的项目
pnpm dev 开发模式(使用 tsx 直接运行)
pnpm dev:build 开发模式(监听并编译)
pnpm test 运行测试
pnpm test:watch 监听模式运行测试
pnpm test:coverage 运行测试并生成覆盖率报告
pnpm typecheck 类型检查

项目结构

.
├── src/              # 源代码目录
│   └── index.ts      # 主入口文件
├── tests/            # 测试文件目录
│   └── index.test.ts # 测试文件
├── dist/             # 编译输出目录
├── vitest.config.ts  # Vitest 配置文件
├── tsconfig.json     # TypeScript 配置文件
└── package.json      # 项目配置文件

环境要求

  • Node.js >= 20.0.0
  • pnpm >= 10.0.0

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •