-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generated comments are redundant and easily conflicted #10
Comments
That makes sense. If you want to submit a PR, that would be awesome. Otherwise, I can get to it later this week. |
Honestly, I would have preferred abstract away the story loader. So your import { AppRegistry } from 'react-native';
import { getStorybookUI, configure } from '@kadira/react-native-storybook';
import { loadStories } from 'react-native-storybook-loader';
// import stories
configure(loadStories, module);
const StorybookUI = getStorybookUI({port: 7007, host: 'localhost'});
AppRegistry.registerComponent('ReactNative', () => StorybookUI); I would personally prefer to keep generated files out of source control. This discussion is probably outside the scope of this ticket, but I wanted to present it to you. |
Thanks for your reply. This does not work for me: import { loadStories } from 'react-native-storybook-loader'; It shows I use Jest as the test runner. I think it is better to run the loader without generating any output file each time before Jest starts . Jest provides |
I know that would cause issues with watcher's too, since the generated file would live under How are you using |
By the way, could you make the loading sequence in alphabetical order? |
Totally, I will create another issue for the sorting. #11 |
Maybe I should call I don't think |
I agree that This is why I want to implement loading stories from the module. My only concern is that there will be issues with webpack or other utilities that perform watches. I guess I will have to try it out. I will open another issue for that. |
Since that may be a larger undertaking, I will fix this issue and the sorting one and kick out a new version for you. |
Thanks for your help and contribution! I'm looking forward to it. 💃 |
Fixed in v1.1.0 |
This is my
storyLoader.js
which was generated by this library:The problem is the generated comments.
When different developers run the loader
./node_modules/.bin/rnstl
to update thestoryLoader.js
file, the generated comments will always conflict with different user's update due to the comments containing the absolute paths with the username and the project path.I think that removing the redundant comments is better.
The text was updated successfully, but these errors were encountered: