Files
halo-dark-mode-plugin/.agents/skills/halo-theme-dev/references/packaging.md
T
Serendipity edbf78f236 feat: 初始化 Halo 暗色模式插件
- Halo Plugin 后端(Java/Gradle),含 DarkModePlugin 主类和测试
- Vue 3 + TypeScript 前端 UI,包含主题切换组件和设置页面
- 暗色模式 CSS 变量和覆盖样式(布局/编辑器/表单/滚动条等)
- 设计文档和调查文档
- Halo 插件/主题开发 Agent Skills

Co-Authored-By: Claude <noreply@anthropic.com>
2026-08-06 21:03:00 +08:00

40 lines
1.2 KiB
Markdown

# Theme Packaging
Use [`@halo-dev/theme-package-cli`](https://github.com/halo-dev/theme-package-cli) to package a theme into a ZIP file for uploading to Halo Console or distributing to others.
## Installation
```bash
npm install -g @halo-dev/theme-package-cli
```
Or run without installing via `npx`:
```bash
npx @halo-dev/theme-package-cli
```
## Usage
Run in the theme root directory (the one containing `theme.yaml`):
```bash
# Package only essential files (recommended)
theme-package
# Package all files (excluding node_modules, dist, .git, etc.)
theme-package --all
```
## Default Package Contents (without `--all`)
| Included | Description |
| ------------------ | ------------------------------------------------- |
| `templates/` | Templates and static assets |
| `*.yaml` / `*.yml` | Config files: `theme.yaml`, `settings.yaml`, etc. |
| `i18n/` | Internationalization files (if present) |
| `README.md` | Documentation file (if present) |
| `LICENSE` | License file (if present) |
> For Vite-based themes, run `npm run build` first to generate the `templates/` output, then run the packaging command.