inline-css icon indicating copy to clipboard operation
inline-css copied to clipboard

Add feature: Command Line Interface

Open fkoyer opened this issue 4 years ago • 6 comments

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.

fkoyer avatar Dec 31 '20 00:12 fkoyer

Coverage Status

Coverage remained the same at 95.897% when pulling 2e046249bf1c7e5eb5e0ac067f025f3f902afef9 on fkoyer:cli into 4291cdf1ffbeddd6c11e963b5b3b5f6e35d5f4ae on jonkemp:master.

coveralls avatar Dec 31 '20 00:12 coveralls

Interesting idea. Not sure why you essentially blew away the README file though if you want this PR to be accepted.

jonkemp avatar Jan 13 '21 17:01 jonkemp

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.

fkoyer avatar Jan 13 '21 18:01 fkoyer

Just following up to see if this PR can be merged.

fkoyer avatar Feb 09 '21 00:02 fkoyer

I plan on reviewing this over the weekend. Thanks for your patience.

jonkemp avatar Feb 13 '21 14:02 jonkemp

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.

jonkemp avatar Feb 15 '21 19:02 jonkemp