-
Notifications
You must be signed in to change notification settings - Fork 15
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 configuration to all current and future projects in workspace #425
Comments
Hi Simon, There is currently no way to do this. I think it should be possible to implement a It is not possible to automatically add stylelint targets to every new project that gets added to the workspace because there it is out of the scope of this project to extends other generators. But you can implement your own Local Plugin Generator which combines the App/Lib Generator you are using with the nx-stylelint:configuration Generator: https://nx.dev/recipes/generators/local-generators and https://nx.dev/recipes/generators/composing-generators |
Hi Philip, alright, maybe I'll have a look at the I think for adding the stylelint targets to new projects I'll write a custom generator for our project as you suggested. Thank you! |
Hey @SimonKunz, how did you manage to make it work for new projects? |
Nx introduced the concept of plugins that can automatically add targets to projects if the project matches some criterias. I'm working on a new version of nx-stylelint that adds the stylelint target when a .stylelintrc file is present at the project root. I think it should be possible to make the plugin configurable to add a stylelint target with a default config to projects containing css or scss files. |
@jase88 We solved it by implementing some custom NX-Generators. We needed them anyway for some other project specific tasks, so it was not a big deal for us. But I really like the idea of a Nx plugin for nx-stylelint. |
Would this be solved with #635 ? |
Hi,
I just installed your plugin on our nx-workspace with > 120 Angular apps and libs. Is there a way to run "nx-stylelint:configuration" for every project in the corresponding angular.json file?
Also I'd be cool to automatically add the configuration to every new project that gets added to the workspace (not sure if that's possible).
Thank you for the great work!
The text was updated successfully, but these errors were encountered: