html-to-react-components icon indicating copy to clipboard operation
html-to-react-components copied to clipboard

Suggestion: Support /dev/stdin and absolute paths

Open CreativeCactus opened this issue 4 years ago • 0 comments

It would be useful to pipe HTML directly into this tool with something like:

curl $URL | pup 'body' | npx -p html-to-react-components html2react

or

curl $URL | pup 'body' | npx -p html-to-react-components html2react -

It would also be useful to support absolute paths like:

curl $URL | pup 'body' | npx -p html-to-react-components html2react /dev/stdin

or

curl $URL | pup 'body' > /tmp/file.html && npx -p html-to-react-components html2react /tmp/file.html

If there is support for this issue I will try to implement, unless the maintainer already has a method in mind. I thought there might be some interface considerations since globbing is used.

CreativeCactus avatar Sep 18 '21 07:09 CreativeCactus