gulp-to-vitelisted
Install: claude install-skill JMAILLY/claude-migration-skills
# Gulp → Vite migration skill (Dockerized Drupal theme)
Migrate a Drupal theme front build from **Gulp** to **Vite**,
iso-functional and low-risk. Reference implementations: `sterimed` (Tailwind) and
`ginger-cebtp` (SASS + classic jQuery scripts — the case this skill is tuned for).
## Golden rule: everything goes through the container
The project is Dockerized + Makefile-driven. Run the build inside the `node`
service, never on the host — the host arch (esp. Apple Silicon/macOS) makes the
`imagemin-*` native binaries fail with `ENOEXEC`, which is **not** a code bug.
| Need | Command |
|---|---|
| Install deps | `make npm-install` (or `make npm c='install'`) |
| Dev server (watch + HMR) | `make npm-dev` |
| Production build | `make npm-build` |
| One-off verify build | `docker run --rm -v "$(pwd)":/var/www/html -w /var/www/html <project>-node:latest sh -c 'rm -rf node_modules && npm install && npm run build'` |
## Step 0 — Feasibility verdict (say this out loud first)
For a classic GM theme, **Vite's headline features (bundling, tree-shaking,
per-module HMR) buy almost nothing.** Check why before promising speed:
- Theme JS is usually **classic jQuery/`Drupal.behaviors` IIFEs** (no
`import`/`export`). Gulp just terser-copies them 1:1. → grep the JS source; if
there are zero `import`/`export`, do **not** bundle — copy files.
- Vendor libs (swiper, fancybox, owl, masonry…) are loaded **straight from
`node_modules/` by `*.libraries.yml`**, never touched by Gulp. → ke