slice-machine icon indicating copy to clipboard operation
slice-machine copied to clipboard

Script to regenerate model files

Open HuyAms opened this issue 4 years ago • 1 comments

Hi, I am using Storybook with Prismic. When I create a new slice, I notice that the stories file is automatically generated. However, if I accidentally delete it, It does not re-generate the file.

I have to pretend to change something to my slice to have the button Save model to filesystem enable. After clicking on that button, I got the stories file generated again.

Also, the mock data is generated pretty randomly which does not fit my UI. Therefore, I manually change the mock data by modifying the mocks.json file. After that, I would like to re-generate the stories since it still uses the old mock data. To do that, I have to repeat the same trick above.

It's nice to have a script to trigger the file regeneration. Should I commit the .slicemachine folder? What is the best way if I want to modify the mock data?

HuyAms avatar Feb 18 '22 15:02 HuyAms

@HuyAms thanks for your request. We are at the moment investing time and efforts into understanding how users use mock data and trying to improve the way these data can be edited/saved. We'll keep you updated. By chance, would you be available to help us doing this doing a few interviews? Let me know and I'll contact you! Thanks

comeprismic avatar Mar 16 '22 15:03 comeprismic