reg-viz / storycap

A Storybook Addon, Save the screenshot image of your stories :camera: via puppeteer.
https://www.npmjs.com/package/storycap
MIT License
701 stars 89 forks source link

[Question] Can I use regex in the exclude option? #811

Open mamaredo opened 12 months ago

mamaredo commented 12 months ago

Can the --exclude cli option use regular expressions? This is just an example, but I am having trouble using regular expressions when I want to exclude stories that contain Hoge. I don't know if I am specifying it incorrectly or if I can't use the regular expression in the first place.

not working😢

$ storycap --exclude \".*Hoge.*\"
raDiesle commented 11 months ago

Storycap uses this library to match https://github.com/micromatch/nanomatch

So one example would be

storycap --exclude "Testing Purpose/**" "UI Testing/**"

@mamaredo