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
feat(@schematics/angular): add configuration files generation schematic #24458
Conversation
edaa337
to
8b4c2fe
Compare
As far as I can see, this doesn't close #24294. Tools like the IntelliJ karma plugin and StrykerJS are still unable to auto-discover the config. 🤷♀️ |
How would these plugins auto discover the config if present in node_modules? You would still need to create a |
8b4c2fe
to
c1fe265
Compare
With my change, a tool could use |
d243f52
to
431eeb0
Compare
This commits add a schematic to generate Karma and Browserlist files which since version 15 are no longer generated by default. This schematic should be used to generate these files when further customisation is needed. Usage ``` ng generate config karma ng generate config browserlist ``` Closes angular#24294
…m built-in karma config Remove options that match the Karma defaults from the built-in karma config
431eeb0
to
1737e98
Compare
Could we at least export a factory method for configuring karma? |
You can use the builder API to transform the built in option
A karma config on its own without the builder is not that useful as karma requires the output of the webpack builder which is done when running |
Ah, I understand the confusion. Please let me elaborate. StrykerJS (and the IntelliJ plugin) discover whether the current project is an Angular or a regular Karma project. If it is an Angular project, it uses The karma config file ("/path/to/stryker/karma.conf.js") provided is a custom karma config file crafted in StrykerJS. From that config file, we load your local karma.conf.js. Since Angular 15, this file is no longer generated; thus, we need a new way to load the angular karma config. I was hoping something like this: #24458 (comment) This is the part of the StrykerJS code that uses |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
This commits add a schematic to generate Karma and Browserlist files which since version 15 are no longer generated by default. This schematic should be used to generate these files when further customisation is needed.
Usage
Closes #24294