Skip to content

Commit

Permalink
Only run it in mdx-to-csf codemod
Browse files Browse the repository at this point in the history
  • Loading branch information
kasperpeulen committed Mar 29, 2023
1 parent 35e693f commit 01bbf5b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion code/lib/cli/src/migrate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ export async function migrate(migration: any, { glob, dryRun, list, rename, logg
if (list) {
listCodemods().forEach((key: any) => logger.log(key));
} else if (migration) {
await runFixes({ fixes: [bareMdxStoriesGlob] });
if (migration === 'mdx-to-csf') {
await runFixes({ fixes: [bareMdxStoriesGlob] });
}
await runCodemod(migration, { glob, dryRun, logger, rename, parser });
} else {
throw new Error('Migrate: please specify a migration name or --list');
Expand Down

0 comments on commit 01bbf5b

Please sign in to comment.