GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Support multiple configurations in commands and target strings by filipesilva · Pull Request #15819 · angular/angular-cli

Conversation

@filipesilva

@filipesilva filipesilva commented Oct 11, 2019

Copy link
Copy Markdown
Contributor

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
All reactions
  • ❤️ 17 reactions
@filipesilva
filipesilva requested a review from clydin October 11, 2019 15:15
@googlebot googlebot added the cla: yes label Oct 11, 2019
@filipesilva filipesilva added the target: major This PR is targeted for the next major release label Oct 11, 2019
@filipesilva
filipesilva force-pushed the multiple-configs branch 3 times, most recently from c67eb81 to 56e654a Compare October 11, 2019 16:02
clydin
clydin reviewed Oct 11, 2019
View reviewed changes
Comment thread packages/angular_devkit/architect/node/node-modules-architect-host.ts Outdated
let additionalOptions = {};

if (target.configuration) {
const configurations = target.configuration.split(',');

@clydin clydin Oct 11, 2019 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

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.

All reactions

@filipesilva filipesilva Oct 14, 2019

Copy link
Copy Markdown
Contributor Author

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.

All reactions
@filipesilva
filipesilva force-pushed the multiple-configs branch from 56e654a to 249abf0 Compare October 14, 2019 08:28
clydin
clydin approved these changes Oct 14, 2019
View reviewed changes
filipesilva added 2 commits October 14, 2019 19:44
@filipesilva
feat(@angular-devkit/architect): support multiple configs in Workspac…
57d9669
…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.
@filipesilva
feat(@angular/cli): support using multiple configurations
55c1699
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
filipesilva force-pushed the multiple-configs branch from 249abf0 to 55c1699 Compare October 14, 2019 18:44
@vikerman
vikerman merged commit 65c2a19 into angular:master Oct 14, 2019
@ocombe

ocombe commented Oct 14, 2019

Copy link
Copy Markdown
Contributor

Omg that is amazing! Thanks a lot!

filipesilva reacted with heart emoji
All reactions
  • ❤️ 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@robertjk

robertjk commented Oct 14, 2019

Copy link
Copy Markdown

Would be good to also update the documentation to mention that you can specify multiple configurations: https://angular.io/cli/build

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@filipesilva filipesilva mentioned this pull request Oct 17, 2019
docs: expand configuration usage angular/angular#33229
Closed
4 of 14 tasks
@filipesilva

filipesilva commented Oct 17, 2019

Copy link
Copy Markdown
Contributor Author

@robertjk PR for that up in angular/angular#33229

robertjk reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

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
@filipesilva @kara
docs: expand configuration usage (#33229)
c22f158
Followup to angular/angular-cli#15819

PR Close #33229
kara pushed a commit to angular/angular that referenced this pull request Nov 12, 2019
@filipesilva @kara
docs: expand configuration usage (#33229)
31c5e67
Followup to angular/angular-cli#15819

PR Close #33229
@angular-automatic-lock-bot

angular-automatic-lock-bot Bot commented Nov 17, 2019

Copy link
Copy Markdown

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@angular-automatic-lock-bot angular-automatic-lock-bot Bot locked and limited conversation to collaborators Nov 17, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Reviewers

@clydin clydin clydin approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

target: major This PR is targeted for the next major release

Projects

None yet

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.

6 participants

@filipesilva @ocombe @robertjk @clydin @vikerman @googlebot
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.
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.