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

Expose all or most config options to the CLI #50

Closed
marcusedwardhaslam opened this issue Oct 20, 2023 · 3 comments · Fixed by #62
Closed

Expose all or most config options to the CLI #50

marcusedwardhaslam opened this issue Oct 20, 2023 · 3 comments · Fixed by #62
Milestone

Comments

@marcusedwardhaslam
Copy link
Collaborator

marcusedwardhaslam commented Oct 20, 2023

In some instances test or spec files might not be pertinent to the user's output. It would be nice to have the ability to ignore certain files. e.g. ./fta ./src --ignore "*.test.*.js"

This is achievable with fta.json configuration.. it'd be nice to have the same flags in the CLI

@sgb-io sgb-io changed the title Add an ability to ignore files that match a glob Expose all or most config options to the CLI Oct 20, 2023
@sgb-io sgb-io added this to the v1.0.0 milestone Oct 20, 2023
@sgb-io
Copy link
Owner

sgb-io commented Oct 21, 2023

It should be noted that some CLI options are not config options.

This excersize should be adding each config option as CLI arguments. There would need to be a decision about which one wins when both are provided: my initial reaction is that CLI arguments should override options specified in fta.json

@sgb-io
Copy link
Owner

sgb-io commented Oct 22, 2023

#62 exposes 4 more options as CLI arguments, but I'm considering support for extensions, exclude_filenames, exclude_directories out of scope, as accepting string array values is a lot more complex.

These particular args could potentially be exposed as a single glob pattern (therefore a single string value, much like the example --ignore "*.test.*.js") but this is not currently compatible with the config implementation where we have some default values and let the user extend those.

I'd be open to some explicit new options that are glob patterns and override the aforementioned config behaviour - obviously, this is a bit more involved.

@sgb-io
Copy link
Owner

sgb-io commented Oct 22, 2023

See follow up issue: #63

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 a pull request may close this issue.

2 participants