elderfo / react-native-storybook-loader

An automatic story loader for react-native-storybooks
https://github.com/elderfo/react-native-storybook-loader
MIT License
299 stars 27 forks source link

feat: export additionnal list of stories paths #49

Closed chambo-e closed 6 years ago

chambo-e commented 6 years ago

Hello, First of all thanks for the package !

At my current team we have a quite unusual way of using storybook, we don't write stories but mutations which are then rendered to stories. This look like this:

export default {
    componentName: 'Text',
    mutations: [{
        description: 'Simple Usage',
        mutation: <Text>Hello</Text>,
    }, ... ]
}

Our storybook config loop through each mutation and add storybook decorators according to its props.

This PR add an additionnal exported value stories to the generated file which is just the raw array of stories paths to be able to apply custom transformation to what's exported in them.

codecov[bot] commented 6 years ago

Codecov Report

Merging #49 into master will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #49   +/-   ##
=======================================
  Coverage   90.44%   90.44%           
=======================================
  Files          10       10           
  Lines         157      157           
  Branches       25       25           
=======================================
  Hits          142      142           
  Misses         14       14           
  Partials        1        1
Impacted Files Coverage Δ
src/writer/index.js 100% <ø> (ø) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 5e99677...691b190. Read the comment docs.

elderfo commented 6 years ago

Looks good, thanks for the PR!