About weapp-tailwindcss-migrate
weapp-tailwindcss-migrate is a skill for moving legacy weapp-tailwindcss projects to the current build setup. It emphasizes configuration diagnosis, targeted changes, and validation across actual output targets.
Key features
- 01Inspect project configuration and build entry points
- 02Plan migration by dependency and target
- 03Remove duplicate Tailwind generation and old patches
- 04Validate builds, classes, HMR, and runtime output
- 05Report file diffs and rollback steps
Use cases
- 01Migrating a legacy weapp-tailwindcss project
- 02Checking Tailwind CSS across app targets
- 03Reviewing migration changes and rollback options
Install
Copy the command and run it in a terminal.
$
npx skills add https:/ / github.com/ sonofmagic/ skills --skill weapp-tailwindcss-migrateAfter installing, type/weapp-tailwindcss-migratein Claude Code to confirm it loaded.
Bundled filesagents/openai.yamlreferences/v5-migration.md
Details
From the project READMEweapp-tailwindcss migrate
从职责边界和构建图迁移旧项目,不在旧配置上叠加补丁。
工作流
- 读取 manifest、锁文件、Tailwind 入口、bundler 配置、PostCSS 配置和运行脚本。
- 识别当前 weapp-tailwindcss/Tailwind/Node/HBuilderX/bundler 版本及所有生成入口。
- 读取 references/v5-migration.md,按依赖、入口、插件、目标端、验证顺序迁移。
- 删除旧 patch 和同一次构建中的重复 Tailwind 生成器,再注册当前
WeappTailwindcss。 - 旧 CLI 用户迁移到独立
@weapp-tailwindcss/cli5.x,并将init、预处理器和目录扫描职责移回项目构建链。 - 将 Tailwind 入口迁移到纯 CSS,保证实际导入,并将全部真实入口写为绝对
cssEntries。 - 移除“一律禁用 H5/Web”的旧逻辑;让 generator 自动识别 Web target。
- 用一次干净构建、一次新增任意值 class 和一次 HMR 更新验证迁移;App 目标必须检查真实运行时。
迁移纪律
- 先记录旧配置和可回滚提交,不批量删除无法确认归属的 PostCSS 或框架插件。
- 只删除 Tailwind 生成职责的重复入口;独立 Web 应用的单独构建可继续使用官方 Tailwind 插件。
- 不用
alwaysEscape或扩大字符串扫描来掩盖过期classNameSet。 - 不把构建成功等同于迁移成功;至少检查目标端 CSS、模板/JS safe class 和新增候选。
输出要求
输出迁移前诊断、删除/保留清单、逐文件 diff、验证结果和回滚步骤,并标出仍需人工验证的设备或 IDE 环境。
Comments
Markdown supported