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

Add -l option to use the unmodified data-component value as the filename #2

Closed pugnascotia closed 8 years ago

pugnascotia commented 8 years ago

I've added the -l option to use the unmodified data-component value as the filename. I prefer to use a camel-case style in my component names, so this option gives the developer complete control over the output filename.

roman01la commented 8 years ago

Hello and thanks for your contribution! What if this behaviour could be done as a default one for -d (moduleFileNameDelimiter) option, what do you think? I don't really want one more option. What if both -d and -l is specified? Which one has more priority then?

pugnascotia commented 8 years ago

Good point. What about using the module name unchanged if the delimiter is set to an empty string?

roman01la commented 8 years ago

I think it could be done for two scenarios:

I'm not sure, but in the second case, when using flag without value the value may be set as true by default automatically. So keep this is mind.