Open scorp-dmitriy opened 4 years ago
Styling can be changed with the following command:
ng config schematics.@schematics/angular:component.styleext scss
@jerone as I said, in nrwl nx repo it doesn't work
This does work for me and my co-workers. There must be some other configuration on your side. Also, i don't know what this NX repo (link) is.
@jerone NX is a tool for monorepos https://nx.dev/angular. It encapsulates some pieces of logic into separate libs. Because of that it looks like this plugin is not able to grab the config from angular.json
and applies default params to the generated component.
Moreover, I'm always using changeDetectionStrategy.OnPush
. In some projects I could not apply this as a default strategy in angular.json
, so it was pretty annoying to manually do it each time I'm generating the component.
What I'm talking about is configuring the plugin by your personal needs not depending on angular.json
. That way it always does what you want
@scorp-dmitriy Currently this extension depends on angular.json for configurations, however, if not found it will just use default configs, need to look into nrwl to see how best to support it
@ivalexa yeah, that's what I'm saying: would be ideal to be able to modify the default configs 🙂
It would be extremely helpful if it's possible to predefine configurations instead of using
-o
flag and manually choose options.I'm working with NX repo and extension cannot determine the correct repo config to use. For example, I use changeDetectionStrategy.OnPush everywhere. And it's pretty annoying to set it manually every time I generate a component. Same for styles: I think, 90% of developers use scss.