-
Notifications
You must be signed in to change notification settings - Fork 12k
Support multiple configurations in commands and target strings #15819
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
Conversation
c67eb81
to
56e654a
Compare
let additionalOptions = {}; | ||
|
||
if (target.configuration) { | ||
const configurations = target.configuration.split(','); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should trim the elements here in case someone does something like -c "one, two, three"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a good idea. Added.
56e654a
to
249abf0
Compare
…eNodeModulesArchitectHost Add support for parsing multiple configurations in a single string using comma as a separator. This support is only at the host level (`WorkspaceNodeModulesArchitectHost` in this case) and does not change the underlying Architect API. Different hosts are able to compose target options in different ways.
It's now possible to use multiple configurations by separating them with a comma: ``` ng build --configuration=one,two,three ``` They will be applied from left to right. If `--prod` is also present, it will be considered to be the first configuration and thus able to be overriden. You can also use it in target strings: ``` "serve": { "builder": "@angular-devkit/build-angular:dev-server", "options": { "browserTarget": "latest-project:build:one,two" }, "configurations": { "production": { "browserTarget": "latest-project:build:production,one,two" } } ``` Fix angular#10612
249abf0
to
55c1699
Compare
Omg that is amazing! Thanks a lot! |
Would be good to also update the documentation to mention that you can specify multiple configurations: https://angular.io/cli/build |
@robertjk PR for that up in angular/angular#33229 |
Followup to angular/angular-cli#15819 PR Close #33229
Followup to angular/angular-cli#15819 PR Close #33229
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. |
It's now possible to use multiple configurations by separating them with a comma:
They will be applied from left to right. If
--prod
is also present, it will be considered to be the first configuration and thus able to be overriden.You can also use it in target strings:
Fix #10612