@mediaman/storybook-to-json
v0.1.0
Published
Extracts stories from Storybook into JSON file.
Downloads
2
Readme
storybook-to-json
Extracts stories from Storybook into a JSON file.
Note: Currently working for Angular projects, support for other frameworks is planned.
Getting Started
Install storybook-to-json in a project that uses Storybook:
npm install @mediaman/storybook-to-json --save-dev
Run with
storybook2json --stories [directory] --out [file]
--stories
Parameter --stories
specifies which directory should be searched for files ending in *.stories.ts
.
--out
Parameter --out
is the file name and path where the resulting json file shall be created.
JSON
Generated JSON looks like this
[{
"kind" : "Welcome",
"stories" : ["to%20Storybook"]
},
{
"kind" : "Button",
"stories" : ["with%20text", "with%20some%20emoji"]
}]
License
MIT © mediaman GmbH