diff --git a/.eslintignore b/.eslintignore index 3c3629e..d96059b 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1 +1,5 @@ node_modules +docs/.next +docs/out +.nx +tmp \ No newline at end of file diff --git a/docs/.eslintignore b/docs/.eslintignore new file mode 100644 index 0000000..a608450 --- /dev/null +++ b/docs/.eslintignore @@ -0,0 +1,3 @@ +node_modules +.next +out diff --git a/docs/src/app/advanced-usage/page.md b/docs/src/app/advanced-usage/page.md new file mode 100644 index 0000000..f049b55 --- /dev/null +++ b/docs/src/app/advanced-usage/page.md @@ -0,0 +1,9 @@ +--- +title: 'Advanced Usage' +nextjs: + metadata: + title: 'Advanced Usage' + description: 'Learn about the advanced usage of `mutates`.' +--- + +WIP diff --git a/docs/src/app/packages/angular/page.md b/docs/src/app/angular/page.md similarity index 100% rename from docs/src/app/packages/angular/page.md rename to docs/src/app/angular/page.md diff --git a/docs/src/app/ast/page.md b/docs/src/app/ast/page.md new file mode 100644 index 0000000..f349494 --- /dev/null +++ b/docs/src/app/ast/page.md @@ -0,0 +1,9 @@ +--- +title: 'Understanding AST' +nextjs: + metadata: + title: 'Understanding AST' + description: 'Learn about the Abstract Syntax Tree (AST)' +--- + +WIP diff --git a/docs/src/app/basic-operations/page.md b/docs/src/app/basic-operations/page.md new file mode 100644 index 0000000..44a6035 --- /dev/null +++ b/docs/src/app/basic-operations/page.md @@ -0,0 +1,9 @@ +--- +title: 'Basic Operations' +nextjs: + metadata: + title: 'Basic Operations' + description: 'Learn about the basic operations in `mutates`.' +--- + +WIP diff --git a/docs/src/app/basic-usage/page.md b/docs/src/app/basic-usage/page.md new file mode 100644 index 0000000..a7e30d7 --- /dev/null +++ b/docs/src/app/basic-usage/page.md @@ -0,0 +1,9 @@ +--- +title: 'Basic Usage' +nextjs: + metadata: + title: 'Basic Usage' + description: 'Learn about the basic usage of `mutates`.' +--- + +WIP diff --git a/docs/src/app/code-of-conduct/page.md b/docs/src/app/code-of-conduct/page.md new file mode 100644 index 0000000..e69de29 diff --git a/docs/src/app/coding-standards/page.md b/docs/src/app/coding-standards/page.md new file mode 100644 index 0000000..950ca5e --- /dev/null +++ b/docs/src/app/coding-standards/page.md @@ -0,0 +1,9 @@ +--- +title: 'Coding Standards' +nextjs: + metadata: + title: 'Coding Standards' + description: 'Learn about the coding standards of `mutates`.' +--- + +WIP diff --git a/docs/src/app/contribution-guide/page.md b/docs/src/app/contribution-guide/page.md new file mode 100644 index 0000000..953ef69 --- /dev/null +++ b/docs/src/app/contribution-guide/page.md @@ -0,0 +1,9 @@ +--- +title: 'Contribution Guide' +nextjs: + metadata: + title: 'Contribution Guide' + description: How to contribute to the Mutates project. +--- + +WIP diff --git a/docs/src/app/packages/core/page.md b/docs/src/app/core/page.md similarity index 100% rename from docs/src/app/packages/core/page.md rename to docs/src/app/core/page.md diff --git a/docs/src/app/framework-integrations/page.md b/docs/src/app/framework-integrations/page.md new file mode 100644 index 0000000..6bd864b --- /dev/null +++ b/docs/src/app/framework-integrations/page.md @@ -0,0 +1,9 @@ +--- +title: 'Framework Integrations' +nextjs: + metadata: + title: 'Framework Integrations' + description: 'Learn about the framework integrations in `mutates`.' +--- + +WIP diff --git a/docs/src/app/frequently-asked-questions/page.md b/docs/src/app/frequently-asked-questions/page.md new file mode 100644 index 0000000..6f6a3b4 --- /dev/null +++ b/docs/src/app/frequently-asked-questions/page.md @@ -0,0 +1,9 @@ +--- +title: 'Frequently Asked Questions' +nextjs: + metadata: + title: 'Frequently Asked Questions' + description: 'Frequently asked questions about `mutates`.' +--- + +WIP diff --git a/docs/src/app/packages/nx/page.md b/docs/src/app/nx/page.md similarity index 100% rename from docs/src/app/packages/nx/page.md rename to docs/src/app/nx/page.md diff --git a/docs/src/app/page.md b/docs/src/app/page.md index ac5127d..a12f305 100644 --- a/docs/src/app/page.md +++ b/docs/src/app/page.md @@ -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 diff --git a/docs/src/app/performance-optimization/page.md b/docs/src/app/performance-optimization/page.md new file mode 100644 index 0000000..60dcfd0 --- /dev/null +++ b/docs/src/app/performance-optimization/page.md @@ -0,0 +1,9 @@ +--- +title: 'Performance Optimization' +nextjs: + metadata: + title: 'Performance Optimization' + description: 'Learn about performance optimization in `mutates`.' +--- + +WIP diff --git a/docs/src/app/quick-start/page.md b/docs/src/app/quick-start/page.md new file mode 100644 index 0000000..14df319 --- /dev/null +++ b/docs/src/app/quick-start/page.md @@ -0,0 +1,9 @@ +--- +title: 'Quick start' +nextjs: + metadata: + title: 'Quick start' + description: 'Learn how to get started with `mutates`.' +--- + +WIP diff --git a/docs/src/app/testing/page.md b/docs/src/app/testing/page.md deleted file mode 100644 index 8a91110..0000000 --- a/docs/src/app/testing/page.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -title: Testing -nextjs: - metadata: - title: Testing - description: Learn how to test your `mutates` scripts. ---- - -WIP diff --git a/docs/src/app/troubleshooting/page.md b/docs/src/app/troubleshooting/page.md new file mode 100644 index 0000000..5e38287 --- /dev/null +++ b/docs/src/app/troubleshooting/page.md @@ -0,0 +1,9 @@ +--- +title: 'Troubleshooting' +nextjs: + metadata: + title: 'Troubleshooting' + description: 'Troubleshooting common issues with `mutates`.' +--- + +WIP diff --git a/docs/src/lib/navigation.ts b/docs/src/lib/navigation.ts index 925948b..0cd2151 100644 --- a/docs/src/lib/navigation.ts +++ b/docs/src/lib/navigation.ts @@ -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' }, + ], }, ]; diff --git a/package-lock.json b/package-lock.json index e01e6fe..a5c7858 100644 --- a/package-lock.json +++ b/package-lock.json @@ -19474,7 +19474,7 @@ "peerDependencies": { "@angular-devkit/schematics": ">=18.0.0", "@mutates/core": "0.0.0-development", - "ts-morph": "^22.0.0" + "ts-morph": ">=22.0.0" } }, "packages/core": { @@ -19489,14 +19489,15 @@ }, "packages/nx": { "name": "@mutates/nx", - "version": "0.0.1", + "version": "0.0.0-development", + "license": "Apache-2.0", "dependencies": { "tslib": "^2.3.0" }, "peerDependencies": { "@mutates/core": "0.0.0-development", - "@nx/devkit": ">= 19.0.0", - "ts-morph": "^22.0.0" + "@nx/devkit": ">=19.0.0", + "ts-morph": ">=22.0.0" } } } diff --git a/packages/angular/src/lib/metadata/get-metadata-property.ts b/packages/angular/src/lib/metadata/get-metadata-property.ts index 0acd68f..3a77203 100644 --- a/packages/angular/src/lib/metadata/get-metadata-property.ts +++ b/packages/angular/src/lib/metadata/get-metadata-property.ts @@ -11,6 +11,10 @@ export function getMetadataProperty( ): PropertyAssignment | undefined { const [metadata] = getMetadata(klass); + if (!metadata) { + return; + } + return getObjectProperties(metadata, { name: property as string, }).at(0);