# tamper-utils **Repository Path**: furtherbank/tamper-utils ## Basic Information - **Project Name**: tamper-utils - **Description**: 自用油猴脚本 utils 远端仓库 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-11-23 - **Last Updated**: 2026-02-08 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Tamper Utils Tampermonkey 工具库 - 提供远程脚本加载和文档转换功能 ## 功能特性 - 🔄 远程脚本加载工具 (`loadScriptPromise`) - 📄 文档转换工具 (`doc-extract`) ## 技术栈 - **TypeScript** - 类型安全 - **Rollup** - 模块打包 - **Vitest** - 单元测试 ## 开发指南 ### 安装依赖 ```bash npm install ``` ### 开发命令 ```bash # 类型检查 npm run type-check # 构建项目 npm run build # 监听模式构建 npm run build:watch # 运行测试 npm test # 测试 UI 界面 npm run test:ui # 生成测试覆盖率 npm run test:coverage # 清理构建文件 npm run clean ``` ## 项目结构 ``` tamper-utils/ ├── src/ # 源代码目录 │ ├── index.ts # 主入口文件 │ ├── loadScriptPromise.ts │ └── utils/ │ └── doc-extract.ts ├── dist/ # 构建输出目录 ├── tests/ # 测试文件目录 ├── tsconfig.json # TypeScript 配置 ├── rollup.config.js # Rollup 打包配置 ├── vitest.config.ts # Vitest 测试配置 └── package.json ``` - 只能在 node 环境下执行的代码,应当以 .node.ts 结尾 - 只能在浏览器环境下执行的代码,应当以 .dom.ts 结尾 - 所有的相对路径代码 import 路径,都需要增加 .js 后缀,以满足 ESM 规范 ## 使用方式 远程代码加载方式: https://gitee.com/furtherbank/tamper-utils/blob/main/ ## 许可证 MIT