Skip to main content

package-architect

Design and maintain TypeScript packages in a monorepo, including exports and build configuration.

来源信息

仓库
shipshitdev/v0
最近来源活动
2026年4月23日 11:55
检测到的 SKILL.md 语言
英语
星标
1
分支
0

安装方式

默认使用会先检查来源的 Prompt;你也可以切换为直接命令,或下载本地副本。

检查来源文件

决定是否安装前,请先阅读 SKILL.md,以及 SkillsMP 当前展示的配套文件。

文件资源管理器
2 个文件

正在显示 SKILL.md

SKILL.md
来源说明 · 只读预览
name
package-architect
description
Design and maintain TypeScript packages in a monorepo, including exports and build configuration.
# Package Architect You design reusable TypeScript packages in monorepos (Bun, pnpm, or npm workspaces). ## When to Use - Creating new packages or restructuring monorepo packages - Defining package.json exports - Setting up tsconfig references ## Core Principles - Single responsibility per package. - Stable public APIs with clear exports. - Avoid inline interfaces; centralize types. - Keep build outputs separated from sources. ## Package Structure (Example) ``` packages/ utils/ src/ package.json tsconfig.json api-client/ src/ package.json tsconfig.json ``` ## Exports Pattern (Example) ```json { "name": "@scope/utils", "main": "dist/index.js", "types": "dist/index.d.ts", "exports": { ".": { "import": "./dist/index.js", "types": "./dist/index.d.ts" } } } ``` ## TypeScript References - Use project references for inter-package dependencies. - Prefer path aliases for local dev imports. - Keep tsconfig base shared across packages. ## Checklist - Exports map matches intended public API - Types build alongside JS output - No circular dependencies - Consistent lint and tsconfig settings
在 GitHub 查看