GeezerVison is showing github.com — Support multiple configurations in commands and target strings by filipesilva · Pull Request #15819 · angular/angular-cli
Conversation
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 #10612
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
alan-agius4, ocombe, douglasward, oemmes, tmtron, sylvaindumont, wulfsberg, minijus, asvishnyakov, schmkr, and 7 more reacted with heart emoji
|
|
let additionalOptions = {};
|
|
|
|
|
|
if (target.configuration) {
|
|
|
const configurations = target.configuration.split(',');
|
clydin
Oct 11, 2019
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
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"
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
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.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
…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
|
Omg that is amazing! Thanks a lot!
|
filipesilva reacted with heart emoji
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
robertjk reacted with thumbs up emoji
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
kara
pushed a commit
to angular/angular
that referenced
this pull request
Nov 12, 2019
kara
pushed a commit
to angular/angular
that referenced
this pull request
Nov 12, 2019
|
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Reviewers
clydin
clydin approved these changes
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Mixing configurations
Uh oh!
There was an error while loading. Please reload this page.
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.
|