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

Fix incorrect path for windows #41

Closed gugamm closed 7 years ago

gugamm commented 7 years ago

Hi, I'm using react-native-storybook-loader on windows and I'm having this issue:

When using rnstl, it generates a file with the following content:

  require('..\src\UI\Button\Button.stories.js');
  require('..\src\UI\Title\Title.stories.js');
  require('..\src\components\MainView\MainView.stories.js');

As you can see, the library generates a string with backslash. As a consequence, the path is wrong.

elderfo commented 7 years ago

Ref #28

elderfo commented 7 years ago

A lot of code was refactored to wrap tests around the path resolution (PR #42) which should prevent this from happening in the future. It was released in v1.4.2