roman01la / html-to-react-components

Converts HTML pages into React components
https://roman01la.github.io/html-to-react-components/
MIT License
2.13k stars 136 forks source link

update readme about passing glob pattern #19

Closed ajmeyghani closed 6 years ago

ajmeyghani commented 6 years ago

It seems like meow automatically creates an array when you provide a wild-card-like pattern. So for the following, the cli.input would be all the files that match the first pattern + all the other things that you specify followed by space:

html2react ./static/**/*.html ./another-folder/file.html 

Now, I haven't tested this on Windows, it could be that Mac automatically does that, but it works!

roman01la commented 6 years ago

Can we do it synchronously? Just readFileSync, without introducing additional dependencies.

ajmeyghani commented 6 years ago

I reverted my changes. It seems like you have to pass the glob pattern as a string. So I updated the readme file to make that clear.

roman01la commented 6 years ago

@aminmeyghani Interesting! Thanks!