Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add feature: Command Line Interface #101

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Conversation

fkoyer
Copy link

@fkoyer fkoyer commented Dec 31, 2020

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.

@coveralls
Copy link

coveralls commented Dec 31, 2020

Coverage Status

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

@jonkemp
Copy link
Owner

jonkemp commented Jan 13, 2021

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

@fkoyer
Copy link
Author

fkoyer commented Jan 13, 2021

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
Copy link
Author

fkoyer commented Feb 9, 2021

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

@jonkemp
Copy link
Owner

jonkemp commented Feb 13, 2021

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

@jonkemp
Copy link
Owner

jonkemp commented Feb 15, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants