Skip to content

Adds argument to disable opening all apps on startup#302

Open
henrikcomes wants to merge 1 commit into
angular-architects:mainfrom
henrikcomes:patch-1
Open

Adds argument to disable opening all apps on startup#302
henrikcomes wants to merge 1 commit into
angular-architects:mainfrom
henrikcomes:patch-1

Conversation

@henrikcomes

Copy link
Copy Markdown

When --open=false is passed to the server, the Angular CLI won't open a new browser tab for each app that was started.
If the argument is not passed or passed with a different value to the server, the Angular CLI will open a new browser tab for each app that was started, to not break the current flow for users

The implementation of yargs could be considered to allow a simpler/cleaner way of implementing more arguments in the future

The next step could be to pass one ore app names into open argument to allow the ability to only open specific apps.
That would help with #155

When --open=false is passed the Angular CLI won't open a new browser tab for each app that was started.
If the argument is not passed the Angular CLI will open a new browser tab for each app that was started, to not break the current flow for users

The implementation of yargs could be considered to allow a simpler/cleaner way of implementing more arguments in the future
@henrikcomes

henrikcomes commented Mar 29, 2023

Copy link
Copy Markdown
Author

This pr could also be changed to removing the -o argument altogether and update the mf schema to configure the angular.json to open the apps instead.

The angular.json already supports the option to open specific apps in a workspace.
This is probably a better way to solve this problem as it would allow people to just change the angular.json if they don't want to have their apps opened when the dev-server is run.
https://github.com/angular/angular-devkit-build-angular-builds/blob/main/src/builders/dev-server/schema.json#L49

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant