SuperAPI AI 工具集

1k-dev-commands

编程与开发

查看项目

更新于 10-15 21:09

技能介绍

用途:为 OneKey monorepo 提供开发与构建命令参考,覆盖桌面、Web、浏览器扩展、iOS、Android 及可嵌入组件等平台,并包含代码质量与测试相关命令。

主要能力: 应用开发:yarn app:desktop 启动桌面 Electron 开发;yarn app:web 启动 Web 开发服务器(端口 3000);yarn app:ext 启动浏览器扩展开发;yarn app:ios 启动 iOS 移动开发;yarn app:android 启动 Android 移动开发;yarn app:web-embed 开发独立钱包组件。 生产构建:yarn app:desktop:build 构建全平台桌面安装包,输出到 apps/desktop/dist/;yarn app:ext:build 构建浏览器扩展,输出到 apps/ext/dist/;yarn app:web:build 构建 Web 静态文件,输出到 apps/web/dist/;yarn app:native-bundle 打包 React Native 应用。 质量与测试:yarn lint:staged 仅检查暂存文件;yarn tsc:staged 类型检查;yarn lint 全面检查(TypeScript、ESLint、目录结构、i18n);yarn test 执行 Jest 测试。 辅助命令:yarn clean 清理构建产物与 node_modules;yarn reinstall 完整重装依赖。

使用方式:提交前可运行 yarn lint:staged && yarn tsc:staged && git commit -m "your message";CI 或提交 PR 前使用 yarn lint 与 yarn test。启动失败时可尝试 yarn clean && yarn reinstall。

适用场景:本地开发、构建验证、提交前检查、CI 流水线及构建问题排查。

限制与前提:iOS 需安装 Xcode 并配置模拟器;Android 需 Android Studio、SDK 工具与模拟器;原生打包需配置好平台开发环境。Jest 配置位于 jest.config.js,测试初始化在 jest-setup.js,测试文件位于各包的 @tests/ 目录,移动端测试使用 jest-expo 预设。各命令运行时长与常见问题见资料说明,未提供的细节暂未提供。