inline-css
inline-css copied to clipboard
Add feature: Command Line Interface
This PR adds a command line interface to make it easier to integrate this tool with other scripts and development tools. I needed this functionality to use this tool as a file watcher in PhpStorm. The script sets the url option to a reasonable default. Tested on Windows 10 and CentOS 7.
Usage: inline-css [FILE]
Description:
Inline css into an html file.
Options:
-h, --help Show this message.
-v, --version Print version information.
With no FILE, or when FILE is -, read standard input.
Coverage remained the same at 95.897% when pulling 2e046249bf1c7e5eb5e0ac067f025f3f902afef9 on fkoyer:cli into 4291cdf1ffbeddd6c11e963b5b3b5f6e35d5f4ae on jonkemp:master.
Interesting idea. Not sure why you essentially blew away the README file though if you want this PR to be accepted.
Sorry, that README file wasn't supposed to be part of the PR. I pushed the correct README file. Let me know if you have any questions.
Just following up to see if this PR can be merged.
I plan on reviewing this over the weekend. Thanks for your patience.
I'm willing to accept a PR to add a cli to inline-css with the stipulation that it uses meow, https://github.com/sindresorhus/meow.
I would also suggest get-stdin to get stdin, https://github.com/sindresorhus/get-stdin.
If you're interested, there is a boilerplate that might make this easier, https://github.com/sindresorhus/node-cli-boilerplate.