Add `--config-file` CLI argument
See original GitHub issueCurrent behavior:
I cannot specify a configuration file path
Desired behavior:
I want to specify a configuration file path
Test code:
cypress run --config-file "/path/to/config"
Additional Info (images, stack traces, etc)
I’m building a tool for PayPal called paypal-scripts
(similar to react-scripts
). One of the purposes is to cover 80% of the use cases by hiding all configuration from the user of the tool so they can focus on just writing the code. If they do create a cypress.json
file then we’ll use that one, but for most people they should be able to just use the built-in configuration of paypal-scripts
and they wont need to have and maintain a cypress.json
file at all. There’s honestly not a lot of configuration we’d need (mostly the baseUrl
I think), but a lot of the value proposition of paypal-scripts
is that people don’t need to worry about configuring anything and it all just works out of the box.
I’m able to do this with eslint
, babel
, and many other tools, but I can’t currently do it with cypress
and I’d like to be able to do that if possible 😃 Thoughts?
Issue Analytics
- State:
- Created 6 years ago
- Reactions:32
- Comments:23 (10 by maintainers)
Top GitHub Comments
You can use the plugins API to programmatically alter the configuration in whatever way you want today.
You can simply have an empty
cypress.json
file and then merge in whatever you’d like based on whatever you’d like in whatever manner you want.https://docs.cypress.io/api/plugins/configuration-api.html
I am confident this can handle whatever you want to throw at it.
Probably so, but that would require that people have the plugin installed. For my use case I want people to be able to simply run:
paypal-scripts e2e
and it’ll start things up for them without them having to have any configuration of plugins setup. The less in their filesystem the less they can mess up/have to maintain.