-
Notifications
You must be signed in to change notification settings - Fork 77
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 separate file to configure this plugin #20
Comments
Hi, several Jest related packages also use environment variables as an alternative to EDIT: just stumbled upon https://github.com/Hargne/jest-html-reporter#continuous-integration |
Hi @kriansa As @pascalduez mentioned, a few configurations can be made using environment variables: Personally i am not opposed to having multiple optional ways of configuring the plugin, so I will have a look at the best way to approach this. |
Rather than creating yet another config file, would it be possible to extend and then read the jest config? |
Additional environment variables have been added in v0.6.0 (#22) that offers an alternative way to configure this plugin (following the design of jest-junit, as suggested by @pascalduez in this comment). No option for an extra configuration file has been added. Adding configuration to jest.config.js is not something that this plugin should do (please read this issue for an explanation). Please re-open this issue if you don't agree with this :) |
Hey @Hargne , It's good to add environment variables so we can override settings at runtime, this is particularly useful for CI jobs. Thanks for doing that 🏆 👍 However, I think that the whole point of this issue is to provide a separate file so we avoid this pattern of adding every JS plugin config to
Many other plugins also use that feature, so the developer tends to think that it's normal, as you said yourself. However, this line of thought is turning That being said, let me say: I don't want to propose dropping support to configure the plugin using Also, maybe injecting into I just wanted to bring up this discussion before submitting any patch. What do you guys think? |
Hi @kriansa As I said previously, I am not personally opposed to having multiple ways of configuring a plugin. But then I was also not entirely convinced of having an extra file containing just 1-4 rows of code, seeing that this is such a small plugin (and also the fact that we would eventually end up with loads of config files bloating our folders instead). However, after hearing your point of view, I must admit that I agree to the fact that it should at least be a possibility to use such a file if that is something that would benefit your project. If you have a suggested fix for it, please do submit a pull request and I will gladly have a look at it! :) |
You're right, a file might sound like an overkill for such a small plugin. Ideally, the right thing IMO would be I will work on that this weekend and submit a patch soon. Thank you for being open to the discussion. 😄 |
…nfig.json, Removed deprecated environment variable configurations, Converted style into CSS, Added new styling, Added build scripts with RollupJS, Added ESLint, Updated documentation
… future themes, Moved the default style into /style, Updated documentation
Hi @kriansa I went ahead and implemented configuration via a standalone config file along with some other new features and improvements. All this is available in v1.0.1. I'm sorry if I took the task away from you, but I realised that there were some general optimisations and improvements I wanted to get out as well :) Please return ASAP and notify me if we can close this issue. |
Wow!! Awesome @Hargne !! Thank you for working on that, I loved the new features! |
Hello @Hargne
First of all, thanks for this plugin. It's been helpful to me 👍
I would like to suggest a feature request that allow the configuration to be set in a different file than
package.json
. It doesn't have to be necessarily the Jest main config, as suggested in #12, but keeping it separate makes sense in the perspective of separation of concerns.Unfortunately,
package .json
has become very bloated, where every JS plugin just "injects" its configuration into it, but this pattern only increases the size of the file while keeps it unmaintainable over time, particularly because you can't just split it.What do you think?
The text was updated successfully, but these errors were encountered: