Skip to content

Commit

Permalink
fix(angular): fix getMetadataProperty fn
Browse files Browse the repository at this point in the history
  • Loading branch information
IKatsuba committed Sep 7, 2024
1 parent 3121f8f commit 8ea23fb
Show file tree
Hide file tree
Showing 22 changed files with 179 additions and 47 deletions.
4 changes: 4 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
node_modules
docs/.next
docs/out
.nx
tmp
3 changes: 3 additions & 0 deletions docs/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules
.next
out
9 changes: 9 additions & 0 deletions docs/src/app/advanced-usage/page.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
title: 'Advanced Usage'
nextjs:
metadata:
title: 'Advanced Usage'
description: 'Learn about the advanced usage of `mutates`.'
---

WIP
File renamed without changes.
9 changes: 9 additions & 0 deletions docs/src/app/ast/page.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
title: 'Understanding AST'
nextjs:
metadata:
title: 'Understanding AST'
description: 'Learn about the Abstract Syntax Tree (AST)'
---

WIP
9 changes: 9 additions & 0 deletions docs/src/app/basic-operations/page.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
title: 'Basic Operations'
nextjs:
metadata:
title: 'Basic Operations'
description: 'Learn about the basic operations in `mutates`.'
---

WIP
9 changes: 9 additions & 0 deletions docs/src/app/basic-usage/page.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
title: 'Basic Usage'
nextjs:
metadata:
title: 'Basic Usage'
description: 'Learn about the basic usage of `mutates`.'
---

WIP
Empty file.
9 changes: 9 additions & 0 deletions docs/src/app/coding-standards/page.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
title: 'Coding Standards'
nextjs:
metadata:
title: 'Coding Standards'
description: 'Learn about the coding standards of `mutates`.'
---

WIP
9 changes: 9 additions & 0 deletions docs/src/app/contribution-guide/page.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
title: 'Contribution Guide'
nextjs:
metadata:
title: 'Contribution Guide'
description: How to contribute to the Mutates project.
---

WIP
File renamed without changes.
9 changes: 9 additions & 0 deletions docs/src/app/framework-integrations/page.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
title: 'Framework Integrations'
nextjs:
metadata:
title: 'Framework Integrations'
description: 'Learn about the framework integrations in `mutates`.'
---

WIP
9 changes: 9 additions & 0 deletions docs/src/app/frequently-asked-questions/page.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
title: 'Frequently Asked Questions'
nextjs:
metadata:
title: 'Frequently Asked Questions'
description: 'Frequently asked questions about `mutates`.'
---

WIP
File renamed without changes.
4 changes: 2 additions & 2 deletions docs/src/app/page.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Get Started
description: 'Welcome to the Mutates documentation!'
title: Overview
description: 'Overview of the Mutates project.'
---

`Mutates` is a fork of [ng-morph](https://github.com/taiga-family/ng-morph) that is focused on
Expand Down
9 changes: 9 additions & 0 deletions docs/src/app/performance-optimization/page.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
title: 'Performance Optimization'
nextjs:
metadata:
title: 'Performance Optimization'
description: 'Learn about performance optimization in `mutates`.'
---

WIP
9 changes: 9 additions & 0 deletions docs/src/app/quick-start/page.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
title: 'Quick start'
nextjs:
metadata:
title: 'Quick start'
description: 'Learn how to get started with `mutates`.'
---

WIP
9 changes: 0 additions & 9 deletions docs/src/app/testing/page.md

This file was deleted.

9 changes: 9 additions & 0 deletions docs/src/app/troubleshooting/page.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
title: 'Troubleshooting'
nextjs:
metadata:
title: 'Troubleshooting'
description: 'Troubleshooting common issues with `mutates`.'
---

WIP
94 changes: 62 additions & 32 deletions docs/src/lib/navigation.ts
Original file line number Diff line number Diff line change
@@ -1,52 +1,82 @@
export const navigation = [
{
title: 'Introduction',
links: [{ title: 'Overview', href: '/' }],
},
{
title: 'Getting started',
links: [
{ title: 'Getting started', href: '/' },
{ title: 'Installation', href: '/installation' },
{ title: 'Quick start', href: '/quick-start' },
],
},
{
title: 'Core Concepts',
links: [
{ title: 'Understanding AST', href: '/ast' },
{ title: 'Basic Operations', href: '/basic-operations' },
],
},
{
title: 'Packages',
title: 'Usage Examples',
links: [
{ title: 'Basic Usage', href: '/basic-usage' },
{ title: 'Advanced Usage', href: '/advanced-usage' },
],
},
{
title: 'API Reference',
links: [
{
title: 'Core',
href: '/packages/core',
title: 'Core API',
href: '/core',
},
{
title: 'Angular',
href: '/packages/angular',
title: 'Angular API',
href: '/angular',
},
{
title: 'Nx',
href: '/packages/nx',
title: 'Nx API',
href: '/nx',
},
],
},
{
title: 'Core concepts',
links: [{ title: 'Testing', href: '/testing' }],
},
// {
// title: 'Advanced guides',
// links: [
// { title: 'Writing plugins', href: '/docs/writing-plugins' },
// { title: 'Neuralink integration', href: '/docs/neuralink-integration' },
// { title: 'Temporal paradoxes', href: '/docs/temporal-paradoxes' },
// { title: 'Testing', href: '/docs/testing' },
// { title: 'Compile-time caching', href: '/docs/compile-time-caching' },
// {
// title: 'Predictive data generation',
// href: '/docs/predictive-data-generation',
// },
// ],
// },
// {
// title: 'API reference',
// links: [],
// },
{
title: 'Contributing',
links: [{ title: 'How to contribute', href: '/how-to-contribute' }],
title: 'Advanced Topics',
links: [
{ title: 'Framework Integrations', href: '/framework-integrations' },
{ title: 'Performance Optimization', href: '/performance-optimization' },
],
},
{
title: 'Best Practices',
links: [
{ title: 'Coding Standards', href: '/coding-standards' },
{ title: 'Testing', href: '/testing' },
],
},
{
title: 'Contribution',
links: [
{ title: 'Contribution Guide', href: '/contribution-guide' },
{ title: 'Code of Conduct', href: '/code-of-conduct' },
],
},
{
title: 'FAQ',
links: [
{ title: 'Frequently Asked Questions', href: '/frequently-asked-questions' },
{ title: 'Troubleshooting', href: '/troubleshooting' },
],
},
{
title: 'Changelog',
links: [{ title: 'Version History', href: 'https://github.com/IKatsuba/mutates/releases' }],
},
{
title: 'License',
links: [
{ title: 'Apache License', href: 'https://github.com/ikatsuba/mutates/blob/main/LICENSE' },
],
},
];
9 changes: 5 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions packages/angular/src/lib/metadata/get-metadata-property.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ export function getMetadataProperty<T extends MetadataProperty>(
): PropertyAssignment | undefined {
const [metadata] = getMetadata(klass);

if (!metadata) {
return;
}

return getObjectProperties(metadata, {
name: property as string,
}).at(0);
Expand Down

0 comments on commit 8ea23fb

Please sign in to comment.