构建指南
npm run build # 使用 TypeScript 编译项目npm run build:bundle # 使用 tsup 构建单文件发布版本npm run dev # 开发模式运行npm run start # 运行生产版本npm run lint # 代码检查 (oxlint)npm run fmt # 代码格式化 (oxfmt)npm run check # 完整检查 (lint + format + type check)构建单文件版本
Section titled “构建单文件版本”npm run build:bundle产物位于 out/index.mjs,是一个独立的可执行文件。
npm run devnpm run check这会依次执行:
- 代码检查 (oxlint)
- 代码格式化 (oxfmt)
- TypeScript 编译