mcpField
W
weapp-tailwindcss-migrate

weapp-tailwindcss-migrate

github.com/sonofmagicDevelopment2104 installsUpdated 3d ago
Repository

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

  1. 01Inspect project configuration and build entry points
  2. 02Plan migration by dependency and target
  3. 03Remove duplicate Tailwind generation and old patches
  4. 04Validate builds, classes, HMR, and runtime output
  5. 05Report file diffs and rollback steps

Use cases

  1. 01Migrating a legacy weapp-tailwindcss project
  2. 02Checking Tailwind CSS across app targets
  3. 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-migrate

After installing, type/weapp-tailwindcss-migratein Claude Code to confirm it loaded.

Bundled filesagents/openai.yamlreferences/v5-migration.md

Details

From the project README

weapp-tailwindcss migrate

从职责边界和构建图迁移旧项目,不在旧配置上叠加补丁。

工作流

  1. 读取 manifest、锁文件、Tailwind 入口、bundler 配置、PostCSS 配置和运行脚本。
  2. 识别当前 weapp-tailwindcss/Tailwind/Node/HBuilderX/bundler 版本及所有生成入口。
  3. 读取 references/v5-migration.md,按依赖、入口、插件、目标端、验证顺序迁移。
  4. 删除旧 patch 和同一次构建中的重复 Tailwind 生成器,再注册当前 WeappTailwindcss。
  5. 旧 CLI 用户迁移到独立 @weapp-tailwindcss/cli 5.x,并将 init、预处理器和目录扫描职责移回项目构建链。
  6. 将 Tailwind 入口迁移到纯 CSS,保证实际导入,并将全部真实入口写为绝对 cssEntries。
  7. 移除“一律禁用 H5/Web”的旧逻辑;让 generator 自动识别 Web target。
  8. 用一次干净构建、一次新增任意值 class 和一次 HMR 更新验证迁移;App 目标必须检查真实运行时。

迁移纪律

  • 先记录旧配置和可回滚提交,不批量删除无法确认归属的 PostCSS 或框架插件。
  • 只删除 Tailwind 生成职责的重复入口;独立 Web 应用的单独构建可继续使用官方 Tailwind 插件。
  • 不用 alwaysEscape 或扩大字符串扫描来掩盖过期 classNameSet。
  • 不把构建成功等同于迁移成功;至少检查目标端 CSS、模板/JS safe class 和新增候选。

输出要求

输出迁移前诊断、删除/保留清单、逐文件 diff、验证结果和回滚步骤,并标出仍需人工验证的设备或 IDE 环境。

Comments

Markdown supported