Closed hipstersmoothie closed 5 years ago
@chrisvxd I have added both outputByKind
and layoutByKind
.
layoutByKind
is a boolean that works exactly like your code above, I just had to add some code to account for the x position.
outputByKind
I changed to be a path instead of a boolean. The way it is now when a user provides outputByKind
: out/directory
, story2sketch will create the individual files while still outputting a file with them all.
I think I’m gonna release a storybook plugin built in this pr. With this code I can add a toolbar icon to download the sketch files for the current displayed story kind 🤯
@hipstersmoothie you mean a fully blown story2sketch plugin? Awesome. That's been something I've thought about in the past.
Re: this PR - Haven't had a chance to look again (busy week) but will try to get around to it today. Would also appreciate your input to my comment in the original issue #63.
Yeah I'm thinking the tool could do a few things. For now it will just download the generated sketch file for the kind.
It might be possible to run story2sketch on the current story rendering to produce a sketch file for whats on screen. I don't think that's possible now though
@chrisvxd :neckbeard:
@hipstersmoothie waiting on outcome of #63 before reviewing :)
Awaiting on API to be updated to match discussions in #63 before reviewing
@chrisvxd changed to match suggested API!
Thanks for the changes again @hipstersmoothie. Will review as soon as I can. Hopefully before I go away on Friday.
Really hoping we can get this soon, i have a storybook with 168 stories and my json file is 25mb large. Sketch doesn't really like that.
Keep up the good work!
@mick-feller Yup shouldn't be long now. In the mean time, you could fork this branch and use that.
@hipstersmoothie going to address my most recent comments to get this in
Merged via #65! (PR comments addressed)
Released in v1.5.0
Trying to address my comments in #63. I plan to add the
byKind
option to write the different kinds to different files.So far my changes have changed what the output looks like for the default mode (single sketch file). Insteaad of all the stories going down vertically, the stories are now going horizontally by kind. I find this a way easier way to consume the output of story2sketch, as I can parse what I'm looking at easier
Here is what it currently looks like. Each column is a different kind (ex: Button, Choice) and the rows in the column are the individual stories.
@chrisvxd what do you think?
EDIT: separate files are now implemented.