@storybook/codemod
- Version 7.4.4
- Published
- 603 kB
- 14 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 }: 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 (14)
Dev Dependencies (15)
Peer Dependencies (0)
No peer dependencies.
Badge
To add a badge like this oneto 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[](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>
- Updated .
Package analyzed in 738 ms. - Missing or incorrect documentation? Open an issue for this package.