mttwm (Material To TailWind Migrator) is an automated CLI tool (v1.7.2) that transforms React components using Material-UI makeStyles/useStyles to Tailwind CSS classes. It runs as a one-off migration via npx or global install, supports dry-run, configurable theme mappings, responsive breakpoints, and generates detailed reports. Unlike manual migration scripts, it handles complex CSS-in-JS scenarios, preserves unmigrated styles, and cleans up unused imports. No npm dependencies required by end users; uses TypeScript internally.
npm install mttwmNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows typical usage: dry-run to preview changes, then apply migration with pattern matching, report generation, and custom config.
Specify multiple patterns if needed, e.g., --pattern 'src/**/*.tsx' --pattern 'src/**/*.jsx'
Narrow the pattern to specific directories first, e.g., --pattern 'src/components/**/*.tsx'
Create a mttwm.config.js with customThemeMapping that maps each unknown theme property to a Tailwind class, e.g., 'theme.custom.primary': 'bg-blue-500'
N/A
Add the missing mapping to mttwm.config.js: export default { customThemeMapping: { 'theme.custom.primary': 'bg-blue-500' } };Create mttwm.config.js in your project root with an export default object. If no custom mappings are needed, ensure the file exists but can be empty export default {};Rename the config file to mttwm.config.mjs, or use .cjs with module.exports = { ... };No dependency data recorded yet.