Skip to content
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

feat(vite-plugin-angular): add ability to export from .ng files #856

Merged
merged 11 commits into from
Jan 19, 2024

Conversation

joshuamorony
Copy link
Contributor

PR Checklist

Please check if 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:

Which package are you modifying?

  • vite-plugin-angular
  • vite-plugin-nitro
  • astro-angular
  • create-analog
  • router
  • platform
  • content
  • nx-plugin
  • trpc

What is the current behavior?

.ng format does not support defining a routeMeta

What is the new behavior?

This allows adding a route configuration to defineMetadata e.g:

  defineMetadata({
    route: {
      title: 'My page',
    },
  });

Happy to modify how this is supplied - this seemed the most natural to me (I have also extended the window type to include the RouteMeta type for route).

I assumed we didn't want to export the routeMeta in .ng files. Another option I considered was having a separate defineRouteMetadata

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

[optional] What gif best describes this PR or how it makes you feel?

Copy link

netlify bot commented Jan 19, 2024

Deploy Preview for analog-docs ready!

Name Link
🔨 Latest commit 0a94d4b
🔍 Latest deploy log https://app.netlify.com/sites/analog-docs/deploys/65aa34de8a311400080e9420
😎 Deploy Preview https://deploy-preview-856--analog-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Jan 19, 2024

Deploy Preview for analog-blog ready!

Name Link
🔨 Latest commit 0a94d4b
🔍 Latest deploy log https://app.netlify.com/sites/analog-blog/deploys/65aa34df0ef113000856e973
😎 Deploy Preview https://deploy-preview-856--analog-blog.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Jan 19, 2024

Deploy Preview for analog-app ready!

Name Link
🔨 Latest commit 0a94d4b
🔍 Latest deploy log https://app.netlify.com/sites/analog-app/deploys/65aa34de9358e90008276621
😎 Deploy Preview https://deploy-preview-856--analog-app.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Jan 19, 2024

Deploy Preview for analog-ng-app ready!

Name Link
🔨 Latest commit 0a94d4b
🔍 Latest deploy log https://app.netlify.com/sites/analog-ng-app/deploys/65aa34df7f331e0008a707a4
😎 Deploy Preview https://deploy-preview-856--analog-ng-app.netlify.app/
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Member

@nartc nartc left a comment

Choose a reason for hiding this comment

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

I personally would go with export const routeMeta and use ts-morph to bring this to the targetSourceFile instead of using defineMetadata for it.

@joshuamorony joshuamorony changed the title feat(vite-plugin-angular): add support for routeMeta in .ng format feat(vite-plugin-angular): add ability to export variables, interfaces, types, and enums from .ng files Jan 19, 2024
@joshuamorony joshuamorony changed the title feat(vite-plugin-angular): add ability to export variables, interfaces, types, and enums from .ng files feat(vite-plugin-angular): add ability to export from .ng files Jan 19, 2024
@brandonroberts brandonroberts merged commit 633e659 into analogjs:main Jan 19, 2024
@brandonroberts
Copy link
Member

Thanks! @allcontributors add @joshuamorony for code

Copy link
Contributor

@brandonroberts

I've put up a pull request to add @joshuamorony! 🎉

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.

None yet

3 participants