Skip to content

Conversation

aparzi
Copy link
Contributor

@aparzi aparzi commented Aug 22, 2024

added option for export class in default mode

Closes #25023

PR Checklist

Please check to confirm your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Other... Please describe:

What is the current behavior?

Issue Number: #25023

What is the new behavior?

added option for export class in default mode. Example ng g c foo --export-default=true. This option will generate a component with default keyword: ... export default class ...

Does this PR introduce a breaking change?

  • Yes
  • No

Copy link
Collaborator

@alan-agius4 alan-agius4 left a comment

Choose a reason for hiding this comment

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

Thank you for this. I have a couple of minor suggestions.

The current commit message is unclear and does not accurately describe the feature.

Something like the following:

feat(@schematics/angular): add option to export component as default

Introduces option `--export-default` to control whether the generated component uses a default export instead of a named export.

Closes: #25023

@alan-agius4 alan-agius4 added action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews target: minor This PR is targeted for the next minor release labels Aug 23, 2024
@angular-robot angular-robot bot added the detected: feature PR contains a feature commit label Aug 23, 2024
@aparzi
Copy link
Contributor Author

aparzi commented Aug 23, 2024

Hi @alan-agius4,
I fixed the suggestions you pointed out to me.

Thanks.

@alan-agius4
Copy link
Collaborator

@aparzi, it looks like you still have the initial commit which is invalid, can you please squash and remove it?

thanks

@angular-robot angular-robot bot removed the detected: feature PR contains a feature commit label Aug 23, 2024
@angular-robot angular-robot bot added the detected: feature PR contains a feature commit label Aug 23, 2024
Introduces option `--export-default` to control whether the generated component uses a default export instead of a named export.

Closes: angular#25023
@aparzi
Copy link
Contributor Author

aparzi commented Aug 23, 2024

@alan-agius4 I fixed the commits everything should be ok. Please recheck the changes as a last check but everything should be ok.

Thanks.

Copy link
Collaborator

@alan-agius4 alan-agius4 left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for your contribution.

@alan-agius4 alan-agius4 added action: merge The PR is ready for merge by the caretaker and removed action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews labels Aug 23, 2024
@alan-agius4 alan-agius4 changed the title @schematics/angular: added option for export class in default mode feat(@schematics/angular): add option to export component as default Aug 23, 2024
@alan-agius4 alan-agius4 merged commit a381a3d into angular:main Aug 23, 2024
32 checks passed
@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 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker area: @schematics/angular detected: feature PR contains a feature commit target: minor This PR is targeted for the next minor release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature: add default export option when using a schematic to generate a component
3 participants