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 tests for the --postcss option in the new CLI #4607

Merged
merged 3 commits into from Jun 10, 2021

Conversation

RobinMalfait
Copy link
Contributor

No description provided.

@RobinMalfait RobinMalfait changed the title add tests for the --postcss option in the new CLI add tests for the --postcss option in the new CLI Jun 10, 2021
By default, `arg()` doesn't have a way to define multiple types. We want
the possibility of using `--postcss` (Boolean) or `--postcss
./custom-path.js`. But by default this is not possible.

This commit will allow us to do a few things, mainly:
- Keep the same API using the `{ type: oneOf(String, Boolean), description: '...' }`
- Keep the `--help` output similar

What we did behind the scenes is make sure to put the non recognized
flags in the `_` arguments list. This is possible by doing `permissive:
true`. We then manually parse those and resolve the correct value.
@adamwathan adamwathan merged commit f4799a3 into master Jun 10, 2021
@adamwathan adamwathan deleted the cli-postcss-improvements branch June 10, 2021 15:35
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

2 participants