DEV Community

Discussion on: We're the core maintainers of Storybook, Ask Us Anything!

Collapse
 
nickytonline profile image
Nick Taylor

Thanks again Norbert and the whole team for taking the time to answer our questions today. Looking forward to helping add Preact to the CLI! Is there an issue for it in the repo, or should I create one?

Collapse
 
norbertdelangen profile image
Norbert de Langen

Hey Nick!

I think it could be relatively straight-forward!

The code for the CLI is here:
github.com/storybooks/storybook/tr...

And the change would essentially be to add detection for the 'preact-project', here's the detect code:
github.com/storybooks/storybook/bl...

And then code a 'generator' for it. We have a few generators already:
github.com/storybooks/storybook/tr... so you can use those as an example!

Last but not least, we should add tests!
The CLI is tested by literally running the CLI on 'fixtures' folders, and assert the file-changes it makes are in occurrence to stored snapshots.