Skip to content

fix(@angular/cli): clean up architect options #10763

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

Merged
merged 1 commit into from
May 10, 2018

Conversation

filipesilva
Copy link
Contributor

Fix #10699

@filipesilva filipesilva force-pushed the clean-architect-options branch 5 times, most recently from 8a61f06 to d37d29f Compare May 10, 2018 10:25
@filipesilva filipesilva force-pushed the clean-architect-options branch from d37d29f to a1bc9f0 Compare May 10, 2018 11:06
project = options.project;
target = this.target;
configuration = options.configuration;
if (!configuration && options.prod) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

--prod is really only specific to a several commands. What about a utility function that handles the --prod helper option that can be called by the particular commands (build, server, e2e, test) before running this.runArchitectTarget(options);? Or even a sub-class for those commands since they are mostly identical otherwise?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I started that way, but then it turned out that not having prod is specific to only one command ou of seven.

Having to massage the options in the six individual commands instead of doing it in ArchitectCommand seems like the better approach, especially since that sort of processing also needs to happen within ArchitectCommand for initialization and validation, which happens before running the command proper.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's awkward that it works on commands it should not but we can correct that moving forward.

@clydin clydin merged commit c9a46eb into angular:master May 10, 2018
@filipesilva filipesilva deleted the clean-architect-options branch May 10, 2018 14:44
@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 12, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

e2e: Unknown option: '--configuration'
3 participants