@storybook/codemod
- Version 8.4.7
- Published
- 612 kB
- 13 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 1
Of deprecated addWithInfo API:
storiesOf('Button').addWithInfo('story name', 'Story description.', () => (<Button label="The Button" />));Converts to the new withInfo API:
storiesOf('Button').add('story name',withInfo('Story description.')(() => <Button label="The Button" />));
function updateOrganisationName
updateOrganisationName: (file: any, api: any) => any;
Package Files (3)
Dependencies (13)
Dev Dependencies (14)
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[![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>
- Updated .
Package analyzed in 3365 ms. - Missing or incorrect documentation? Open an issue for this package.