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

Feature Request: support stdin / stdout #45

Open
werrolf opened this issue Jan 31, 2020 · 0 comments
Open

Feature Request: support stdin / stdout #45

werrolf opened this issue Jan 31, 2020 · 0 comments

Comments

@werrolf
Copy link

werrolf commented Jan 31, 2020

For script integration and general utility, it would be nice to have the ability to

  1. cosume stdin as css input
  2. emit processed result on stdout

Current workflow for input seems to assume a signle local file exists with all input. This may not be the case. Direct input building via e.g. *nix cat or input fetching with wget or curl is not possible because of this assumption. A separate file building step is required in these cases.

Current workflow for output always produces a new file decorated with .min intermediate extension if the --output option is omitted. This prevents e.g. quick change detection by piping into md5sum, wc -c and so forth, or further processing by other tools. It also prevents shell-based file redirection.

The usual convention for stdin / stdout processing in command line tools is to either do it by default, in absence of file-specific options, or to recognize - as a ~magic file name referring to either stdin or stdout.

Input could potentially default to stdin. Defaulting output to stdout OTOH would break compatibility with all existing scripts using css-purge.

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

No branches or pull requests

1 participant