@storybook/codemod

  • Version 8.0.8
  • Published
  • 608 kB
  • 15 dependencies
  • MIT license

Install

npm i @storybook/codemod
yarn add @storybook/codemod
pnpm add @storybook/codemod

Overview

A collection of codemod scripts written with JSCodeshift

Index

Variables

variable packageNames

const packageNames: {
'@kadira/react-storybook-decorator-centered': string;
'@kadira/storybook-addons': string;
'@kadira/storybook-addon-actions': string;
'@kadira/storybook-addon-comments': string;
'@kadira/storybook-addon-graphql': string;
'@kadira/storybook-addon-info': string;
'@kadira/storybook-addon-knobs': string;
'@kadira/storybook-addon-links': string;
'@kadira/storybook-addon-notes': string;
'@kadira/storybook-addon-options': string;
'@kadira/storybook-channels': string;
'@kadira/storybook-channel-postmsg': string;
'@kadira/storybook-channel-websocket': string;
'@kadira/storybook-ui': string;
'@kadira/react-native-storybook': string;
'@kadira/react-storybook': string;
'@kadira/getstorybook': string;
'@kadira/storybook': string;
storyshots: string;
getstorybook: string;
};

    Functions

    function listCodemods

    listCodemods: () => string[];

      function runCodemod

      runCodemod: (
      codemod: any,
      {
      glob,
      logger,
      dryRun,
      rename,
      parser,
      }: { glob: any; logger: any; dryRun?: any; rename?: any; parser?: any }
      ) => Promise<void>;

        function updateAddonInfo

        updateAddonInfo: (file: any, api: any) => any;
        • Takes the deprecated addon-info API, addWithInfo, and converts to the new withInfo API.

          Example of deprecated addWithInfo API:

          storiesOf('Button') .addWithInfo( 'story name', 'Story description.', () => ( ) )

          Converts to the new withInfo API:

          storiesOf('Button') .add('story name', withInfo( 'Story description.' )(() => ( )))

        function updateOrganisationName

        updateOrganisationName: (file: any, api: any) => any;

          Package Files (3)

          Dependencies (15)

          Dev Dependencies (13)

          Peer Dependencies (0)

          No peer dependencies.

          Badge

          To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

          You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@storybook/codemod.

          • Markdown
            [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@storybook/codemod)
          • HTML
            <a href="https://www.jsdocs.io/package/@storybook/codemod"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>