Repository navigation
Support multiple configurations in commands and target strings - #15819
Merged
Merged
Conversation
filipesilva
force-pushed
the
multiple-configs
branch
3 times, most recently
from
October 11, 2019 16:02
c67eb81 to
56e654a
Compare
clydin
reviewed
Oct 11, 2019
| let additionalOptions = {}; | ||
|
|
||
| if (target.configuration) { | ||
| const configurations = target.configuration.split(','); |
Member
There was a problem hiding this comment.
I think we should trim the elements here in case someone does something like -c "one, two, three"
Contributor
Author
There was a problem hiding this comment.
That's a good idea. Added.
filipesilva
force-pushed
the
multiple-configs
branch
from
October 14, 2019 08:28
56e654a to
249abf0
Compare
clydin
approved these changes
Oct 14, 2019
…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
filipesilva
force-pushed
the
multiple-configs
branch
from
October 14, 2019 18:44
249abf0 to
55c1699
Compare
Contributor
|
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 |
4 of 14 tasks
Contributor
Author
|
@robertjk PR for that up in angular/angular#33229 |
kara
pushed a commit
to angular/angular
that referenced
this pull request
Nov 12, 2019
Followup to angular/angular-cli#15819 PR Close #33229
kara
pushed a commit
to angular/angular
that referenced
this pull request
Nov 12, 2019
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
It's now possible to use multiple configurations by separating them with a comma:
They will be applied from left to right. If
--prodis 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