# @devflow-tools/plugin-taro

> Taro 跨端专家插件 — 多端适配、小程序调试、性能优化、兼容方案。（v0.17.8）

## 安装

```bash
npm install @devflow-tools/plugin-taro
```

## 使用

插件通过 DevFlow/Claude Code 使用：

```text
/devflow:taro <你的任务>
```

## 能力与知识源

## MCP Tools

| Tool | 说明 | 关键参数 |
|------|------|---------|
| `taro_new_page` | 新建 Taro 页面（跨端兼容 + 路由注册 + 分包配置） | `projectRoot` |

## Knowledge Sources

| 来源 | URL | SPA |
|------|-----|-----|
| Taro 官方文档 | https://docs.taro.zone/docs | Yes |

## Memory

插件自动注入以下最佳实践：
- `Taro.getSystemInfoSync()` 获取平台信息
- 条件编译：`process.env.TARO_ENV` 区分 h5/weapp/alipay
- 小程序分包策略：主包 < 2MB 限制
- 样式单位统一使用 `px`（Taro 自动转换）
- 使用 `@tarojs/plugin-html` 支持 HTML 标签


## 兼容性

需要 Node.js >= 18，并与同版本 @devflow-tools/sdk、DevFlow CLI 配合使用。插件不是独立 HTTP 服务。

## 相关链接

- [仓库](https://github.com/shilongfeicool/dev-flow)
- [插件目录](https://github.com/shilongfeicool/dev-flow/tree/main/plugins)

## License

MIT


## 兼容性

需要 Node.js >= 18，并与同版本 @devflow-tools/sdk、DevFlow CLI 配合使用。插件不是独立 HTTP 服务。

## 相关链接

- [仓库](https://github.com/shilongfeicool/dev-flow)
- [插件目录](https://github.com/shilongfeicool/dev-flow/tree/main/plugins)

## License

MIT


## 兼容性

需要 Node.js >= 18，并与同版本 @devflow-tools/sdk、DevFlow CLI 配合使用。插件不是独立 HTTP 服务。

## 相关链接

- [仓库](https://github.com/shilongfeicool/dev-flow)
- [插件目录](https://github.com/shilongfeicool/dev-flow/tree/main/plugins)

## License

MIT


## 兼容性

需要 Node.js >= 18，并与同版本 @devflow-tools/sdk、DevFlow CLI 配合使用。插件不是独立 HTTP 服务。

## 相关链接

- [仓库](https://github.com/shilongfeicool/dev-flow)
- [插件目录](https://github.com/shilongfeicool/dev-flow/tree/main/plugins)

## License

MIT
