How to use @storybook/codemod - 2 common examples

To help you get started, we’ve selected a few @storybook/codemod examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github storybookjs / storybook / lib / cli / lib / migrate.js View on Github external
export async function migrate(migration, { configDir, glob, dryRun, list, rename, logger }) {
  if (list) {
    listCodemods().forEach(key => logger.log(key));
  } else if (migration) {
    await runCodemod(migration, { configDir, glob, dryRun, logger, rename });
  } else {
    throw new Error('Migrate: please specify a migration name or --list');
  }
}
github storybookjs / storybook / lib / cli / lib / migrate.js View on Github external
export async function migrate(migration, { configDir, glob, dryRun, list, rename, logger }) {
  if (list) {
    listCodemods().forEach(key => logger.log(key));
  } else if (migration) {
    await runCodemod(migration, { configDir, glob, dryRun, logger, rename });
  } else {
    throw new Error('Migrate: please specify a migration name or --list');
  }
}

@storybook/codemod

A collection of codemod scripts written with JSCodeshift

MIT
Latest version published 17 days ago

Package Health Score

89 / 100
Full package analysis