Skip to content

Commit 8ea23fb

Browse files
committed
fix(angular): fix getMetadataProperty fn
1 parent 3121f8f commit 8ea23fb

File tree

22 files changed

+179
-47
lines changed

22 files changed

+179
-47
lines changed

.eslintignore

+4
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
11
node_modules
2+
docs/.next
3+
docs/out
4+
.nx
5+
tmp

docs/.eslintignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
node_modules
2+
.next
3+
out

docs/src/app/advanced-usage/page.md

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
title: 'Advanced Usage'
3+
nextjs:
4+
metadata:
5+
title: 'Advanced Usage'
6+
description: 'Learn about the advanced usage of `mutates`.'
7+
---
8+
9+
WIP
File renamed without changes.

docs/src/app/ast/page.md

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
title: 'Understanding AST'
3+
nextjs:
4+
metadata:
5+
title: 'Understanding AST'
6+
description: 'Learn about the Abstract Syntax Tree (AST)'
7+
---
8+
9+
WIP

docs/src/app/basic-operations/page.md

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
title: 'Basic Operations'
3+
nextjs:
4+
metadata:
5+
title: 'Basic Operations'
6+
description: 'Learn about the basic operations in `mutates`.'
7+
---
8+
9+
WIP

docs/src/app/basic-usage/page.md

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
title: 'Basic Usage'
3+
nextjs:
4+
metadata:
5+
title: 'Basic Usage'
6+
description: 'Learn about the basic usage of `mutates`.'
7+
---
8+
9+
WIP

docs/src/app/code-of-conduct/page.md

Whitespace-only changes.

docs/src/app/coding-standards/page.md

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
title: 'Coding Standards'
3+
nextjs:
4+
metadata:
5+
title: 'Coding Standards'
6+
description: 'Learn about the coding standards of `mutates`.'
7+
---
8+
9+
WIP
+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
title: 'Contribution Guide'
3+
nextjs:
4+
metadata:
5+
title: 'Contribution Guide'
6+
description: How to contribute to the Mutates project.
7+
---
8+
9+
WIP
File renamed without changes.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
title: 'Framework Integrations'
3+
nextjs:
4+
metadata:
5+
title: 'Framework Integrations'
6+
description: 'Learn about the framework integrations in `mutates`.'
7+
---
8+
9+
WIP
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
title: 'Frequently Asked Questions'
3+
nextjs:
4+
metadata:
5+
title: 'Frequently Asked Questions'
6+
description: 'Frequently asked questions about `mutates`.'
7+
---
8+
9+
WIP
File renamed without changes.

docs/src/app/page.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
2-
title: Get Started
3-
description: 'Welcome to the Mutates documentation!'
2+
title: Overview
3+
description: 'Overview of the Mutates project.'
44
---
55

66
`Mutates` is a fork of [ng-morph](https://github.com/taiga-family/ng-morph) that is focused on
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
title: 'Performance Optimization'
3+
nextjs:
4+
metadata:
5+
title: 'Performance Optimization'
6+
description: 'Learn about performance optimization in `mutates`.'
7+
---
8+
9+
WIP

docs/src/app/quick-start/page.md

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
title: 'Quick start'
3+
nextjs:
4+
metadata:
5+
title: 'Quick start'
6+
description: 'Learn how to get started with `mutates`.'
7+
---
8+
9+
WIP

docs/src/app/testing/page.md

-9
This file was deleted.

docs/src/app/troubleshooting/page.md

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
title: 'Troubleshooting'
3+
nextjs:
4+
metadata:
5+
title: 'Troubleshooting'
6+
description: 'Troubleshooting common issues with `mutates`.'
7+
---
8+
9+
WIP

docs/src/lib/navigation.ts

+62-32
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,82 @@
11
export const navigation = [
22
{
33
title: 'Introduction',
4+
links: [{ title: 'Overview', href: '/' }],
5+
},
6+
{
7+
title: 'Getting started',
48
links: [
5-
{ title: 'Getting started', href: '/' },
69
{ title: 'Installation', href: '/installation' },
10+
{ title: 'Quick start', href: '/quick-start' },
11+
],
12+
},
13+
{
14+
title: 'Core Concepts',
15+
links: [
16+
{ title: 'Understanding AST', href: '/ast' },
17+
{ title: 'Basic Operations', href: '/basic-operations' },
718
],
819
},
920
{
10-
title: 'Packages',
21+
title: 'Usage Examples',
22+
links: [
23+
{ title: 'Basic Usage', href: '/basic-usage' },
24+
{ title: 'Advanced Usage', href: '/advanced-usage' },
25+
],
26+
},
27+
{
28+
title: 'API Reference',
1129
links: [
1230
{
13-
title: 'Core',
14-
href: '/packages/core',
31+
title: 'Core API',
32+
href: '/core',
1533
},
1634
{
17-
title: 'Angular',
18-
href: '/packages/angular',
35+
title: 'Angular API',
36+
href: '/angular',
1937
},
2038
{
21-
title: 'Nx',
22-
href: '/packages/nx',
39+
title: 'Nx API',
40+
href: '/nx',
2341
},
2442
],
2543
},
2644
{
27-
title: 'Core concepts',
28-
links: [{ title: 'Testing', href: '/testing' }],
29-
},
30-
// {
31-
// title: 'Advanced guides',
32-
// links: [
33-
// { title: 'Writing plugins', href: '/docs/writing-plugins' },
34-
// { title: 'Neuralink integration', href: '/docs/neuralink-integration' },
35-
// { title: 'Temporal paradoxes', href: '/docs/temporal-paradoxes' },
36-
// { title: 'Testing', href: '/docs/testing' },
37-
// { title: 'Compile-time caching', href: '/docs/compile-time-caching' },
38-
// {
39-
// title: 'Predictive data generation',
40-
// href: '/docs/predictive-data-generation',
41-
// },
42-
// ],
43-
// },
44-
// {
45-
// title: 'API reference',
46-
// links: [],
47-
// },
48-
{
49-
title: 'Contributing',
50-
links: [{ title: 'How to contribute', href: '/how-to-contribute' }],
45+
title: 'Advanced Topics',
46+
links: [
47+
{ title: 'Framework Integrations', href: '/framework-integrations' },
48+
{ title: 'Performance Optimization', href: '/performance-optimization' },
49+
],
50+
},
51+
{
52+
title: 'Best Practices',
53+
links: [
54+
{ title: 'Coding Standards', href: '/coding-standards' },
55+
{ title: 'Testing', href: '/testing' },
56+
],
57+
},
58+
{
59+
title: 'Contribution',
60+
links: [
61+
{ title: 'Contribution Guide', href: '/contribution-guide' },
62+
{ title: 'Code of Conduct', href: '/code-of-conduct' },
63+
],
64+
},
65+
{
66+
title: 'FAQ',
67+
links: [
68+
{ title: 'Frequently Asked Questions', href: '/frequently-asked-questions' },
69+
{ title: 'Troubleshooting', href: '/troubleshooting' },
70+
],
71+
},
72+
{
73+
title: 'Changelog',
74+
links: [{ title: 'Version History', href: 'https://github.com/IKatsuba/mutates/releases' }],
75+
},
76+
{
77+
title: 'License',
78+
links: [
79+
{ title: 'Apache License', href: 'https://github.com/ikatsuba/mutates/blob/main/LICENSE' },
80+
],
5181
},
5282
];

package-lock.json

+5-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/angular/src/lib/metadata/get-metadata-property.ts

+4
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ export function getMetadataProperty<T extends MetadataProperty>(
1111
): PropertyAssignment | undefined {
1212
const [metadata] = getMetadata(klass);
1313

14+
if (!metadata) {
15+
return;
16+
}
17+
1418
return getObjectProperties(metadata, {
1519
name: property as string,
1620
}).at(0);

0 commit comments

Comments
 (0)