rakonto
v0.0.21
Published
## a lightweight alternative to react-storybook built on esbuild and ts.
Readme
Rakonto
a lightweight alternative to react-storybook built on esbuild and ts.
Usage
- Install as a dependency:
npm install rakonto- Create a
.storyboardrc.jsfile in your project root (this file must be at the root of your project):
export default {
stories: [
'src/stories/Button.stories.jsx',
'src/stories/Header.stories.jsx',
// Add your story files here
]
};- Create story files that use the Story function:
import Story from 'rakonto/story.tsx';
import React from 'react';
import { Button } from './Button';
export default function ButtonStory() {
return Story(
<Button primary size="large">
Click me
</Button>
);
}The
publicdirectory and HTML files will be created automatically when you run the rakonto command.Add scripts to your package.json:
{
"scripts": {
"storybook": "rakonto --dev",
"build-storybook": "rakonto"
}
}- Run the storybook:
npm run storybookThis will start the development server at http://localhost:8000
