react-storybook-excluder
v2.1.0
Published
> "Spare me your stories!"
Downloads
2
Readme
React Storybook Excluder
"Spare me your stories!"
A single line off from elderfo's story loading tool. Because I couldn't exclude node_modules
good with globs.
But actually, it's a CLI for dynamically importing stories into Storybook for React Native.
package.json
{
"name": "awesome-project",
"scripts": {
"prestorybook": "rnstl"
},
"config": {
"react-native-storybook-loader": {
"searchDir": ["./src", "./packages"],
"pattern": "**/*.stories.js",
"outputFile": "./storybook/storyLoader.js"
}
}
}
Story Loader API
A story loader is the file generated by rnstl
used to load story files from your project in to Storybook.
Story Loader Formatting
To ensure the formatting of your story loader is on par with the rest of your code base, rnstl
uses Prettier to format the generated story loaders. It will travese up the tree looking for a Prettier configuration file. If none is found, the defaul Prettier settings will be used.