From f91a02931dfa1215c21f106d6262b283ad491ffb Mon Sep 17 00:00:00 2001 From: Kordrad Date: Thu, 11 Jul 2024 13:10:10 +0200 Subject: [PATCH] refactor: move code to src folder --- projects/cli/package.json | 4 ++-- projects/cli/{ => src}/schematics/collection.json | 2 +- .../schematics/components/components-generator.ts | 0 .../components/files/avatar/avatar.component.scss | 0 .../components/files/avatar/avatar.component.spec.ts | 0 .../components/files/avatar/avatar.component.ts | 0 .../{ => src}/schematics/components/files/avatar/index.ts | 0 .../components/files/badge/badge.component.scss | 0 .../components/files/badge/badge.component.spec.ts | 0 .../schematics/components/files/badge/badge.component.ts | 0 .../{ => src}/schematics/components/files/badge/index.ts | 0 .../components/files/button/button.component.scss | 0 .../components/files/button/button.component.spec.ts | 0 .../components/files/button/button.component.ts | 0 .../{ => src}/schematics/components/files/button/index.ts | 0 .../components/files/checkbox/checkbox.component.html | 0 .../components/files/checkbox/checkbox.component.scss | 0 .../components/files/checkbox/checkbox.component.spec.ts | 0 .../components/files/checkbox/checkbox.component.ts | 0 .../schematics/components/files/checkbox/index.ts | 0 .../{ => src}/schematics/components/files/pin/index.ts | 0 .../schematics/components/files/pin/pin.component.scss | 0 .../schematics/components/files/pin/pin.component.spec.ts | 0 .../schematics/components/files/pin/pin.component.ts | 0 .../{ => src}/schematics/components/files/radio/index.ts | 0 .../components/files/radio/radio.component.html | 0 .../components/files/radio/radio.component.scss | 0 .../components/files/radio/radio.component.spec.ts | 0 .../schematics/components/files/radio/radio.component.ts | 0 .../{ => src}/schematics/components/files/switch/index.ts | 0 .../components/files/switch/zen-switch.component.html | 0 .../components/files/switch/zen-switch.component.scss | 0 .../components/files/switch/zen-switch.component.spec.ts | 0 .../components/files/switch/zen-switch.component.ts | 0 .../{ => src}/schematics/components/files/tag/index.ts | 0 .../schematics/components/files/tag/tag.component.scss | 0 .../schematics/components/files/tag/tag.component.spec.ts | 0 .../schematics/components/files/tag/tag.component.ts | 0 projects/cli/{ => src}/schematics/components/index.ts | 2 +- projects/cli/{ => src}/schematics/components/schema.json | 0 .../schematics/components/templates/README.md.template | 0 .../schematics/directives/directives-generator.ts | 0 .../directives/files/disabled/disabled.directive.spec.ts | 0 .../directives/files/disabled/disabled.directive.ts | 0 .../schematics/directives/files/disabled/index.ts | 0 projects/cli/{ => src}/schematics/directives/index.ts | 2 +- projects/cli/{ => src}/schematics/directives/schema.json | 0 .../schematics/directives/templates/README.md.template | 0 projects/cli/{ => src}/schematics/ng-add/index.ts | 2 +- .../cli/{ => src}/schematics/ng-add/ng-zen-generator.ts | 0 projects/cli/{ => src}/schematics/ng-add/schema.json | 0 .../_utils => src/utils}/add-path-to-tsconfig.util.ts | 0 .../_utils => src/utils}/apply-file-template.util.ts | 0 projects/cli/src/utils/index.ts | 2 ++ projects/cli/tsconfig.schematics.json | 8 ++++---- tsconfig.json | 8 ++++++-- 56 files changed, 18 insertions(+), 12 deletions(-) rename projects/cli/{ => src}/schematics/collection.json (86%) rename projects/cli/{ => src}/schematics/components/components-generator.ts (100%) rename projects/cli/{ => src}/schematics/components/files/avatar/avatar.component.scss (100%) rename projects/cli/{ => src}/schematics/components/files/avatar/avatar.component.spec.ts (100%) rename projects/cli/{ => src}/schematics/components/files/avatar/avatar.component.ts (100%) rename projects/cli/{ => src}/schematics/components/files/avatar/index.ts (100%) rename projects/cli/{ => src}/schematics/components/files/badge/badge.component.scss (100%) rename projects/cli/{ => src}/schematics/components/files/badge/badge.component.spec.ts (100%) rename projects/cli/{ => src}/schematics/components/files/badge/badge.component.ts (100%) rename projects/cli/{ => src}/schematics/components/files/badge/index.ts (100%) rename projects/cli/{ => src}/schematics/components/files/button/button.component.scss (100%) rename projects/cli/{ => src}/schematics/components/files/button/button.component.spec.ts (100%) rename projects/cli/{ => src}/schematics/components/files/button/button.component.ts (100%) rename projects/cli/{ => src}/schematics/components/files/button/index.ts (100%) rename projects/cli/{ => src}/schematics/components/files/checkbox/checkbox.component.html (100%) rename projects/cli/{ => src}/schematics/components/files/checkbox/checkbox.component.scss (100%) rename projects/cli/{ => src}/schematics/components/files/checkbox/checkbox.component.spec.ts (100%) rename projects/cli/{ => src}/schematics/components/files/checkbox/checkbox.component.ts (100%) rename projects/cli/{ => src}/schematics/components/files/checkbox/index.ts (100%) rename projects/cli/{ => src}/schematics/components/files/pin/index.ts (100%) rename projects/cli/{ => src}/schematics/components/files/pin/pin.component.scss (100%) rename projects/cli/{ => src}/schematics/components/files/pin/pin.component.spec.ts (100%) rename projects/cli/{ => src}/schematics/components/files/pin/pin.component.ts (100%) rename projects/cli/{ => src}/schematics/components/files/radio/index.ts (100%) rename projects/cli/{ => src}/schematics/components/files/radio/radio.component.html (100%) rename projects/cli/{ => src}/schematics/components/files/radio/radio.component.scss (100%) rename projects/cli/{ => src}/schematics/components/files/radio/radio.component.spec.ts (100%) rename projects/cli/{ => src}/schematics/components/files/radio/radio.component.ts (100%) rename projects/cli/{ => src}/schematics/components/files/switch/index.ts (100%) rename projects/cli/{ => src}/schematics/components/files/switch/zen-switch.component.html (100%) rename projects/cli/{ => src}/schematics/components/files/switch/zen-switch.component.scss (100%) rename projects/cli/{ => src}/schematics/components/files/switch/zen-switch.component.spec.ts (100%) rename projects/cli/{ => src}/schematics/components/files/switch/zen-switch.component.ts (100%) rename projects/cli/{ => src}/schematics/components/files/tag/index.ts (100%) rename projects/cli/{ => src}/schematics/components/files/tag/tag.component.scss (100%) rename projects/cli/{ => src}/schematics/components/files/tag/tag.component.spec.ts (100%) rename projects/cli/{ => src}/schematics/components/files/tag/tag.component.ts (100%) rename projects/cli/{ => src}/schematics/components/index.ts (80%) rename projects/cli/{ => src}/schematics/components/schema.json (100%) rename projects/cli/{ => src}/schematics/components/templates/README.md.template (100%) rename projects/cli/{ => src}/schematics/directives/directives-generator.ts (100%) rename projects/cli/{ => src}/schematics/directives/files/disabled/disabled.directive.spec.ts (100%) rename projects/cli/{ => src}/schematics/directives/files/disabled/disabled.directive.ts (100%) rename projects/cli/{ => src}/schematics/directives/files/disabled/index.ts (100%) rename projects/cli/{ => src}/schematics/directives/index.ts (80%) rename projects/cli/{ => src}/schematics/directives/schema.json (100%) rename projects/cli/{ => src}/schematics/directives/templates/README.md.template (100%) rename projects/cli/{ => src}/schematics/ng-add/index.ts (84%) rename projects/cli/{ => src}/schematics/ng-add/ng-zen-generator.ts (100%) rename projects/cli/{ => src}/schematics/ng-add/schema.json (100%) rename projects/cli/{schematics/_utils => src/utils}/add-path-to-tsconfig.util.ts (100%) rename projects/cli/{schematics/_utils => src/utils}/apply-file-template.util.ts (100%) create mode 100644 projects/cli/src/utils/index.ts diff --git a/projects/cli/package.json b/projects/cli/package.json index 2d8a70d..c82db81 100644 --- a/projects/cli/package.json +++ b/projects/cli/package.json @@ -18,10 +18,10 @@ "scripts": { "build": "tsc -p tsconfig.schematics.json", "postbuild": "npm run copy-files && npm run clean-packagejson", - "copy-files": "copyfiles schematics/*/schema.json schematics/*/files/** schematics/*/templates/** schematics/collection.json **/README.md **/CHANGELOG.md LICENSE package.json ../../dist/@ng-zen/cli/", + "copy-files": "copyfiles src/schematics/*/schema.json src/schematics/*/files/** src/schematics/*/templates/** src/schematics/collection.json **/README.md **/CHANGELOG.md LICENSE package.json ../../dist/@ng-zen/cli/", "clean-packagejson": "cd ../../dist/@ng-zen/cli && npm pkg delete scripts" }, - "schematics": "./schematics/collection.json", + "schematics": "./src/schematics/collection.json", "ng-add": { "save": "devDependencies" }, diff --git a/projects/cli/schematics/collection.json b/projects/cli/src/schematics/collection.json similarity index 86% rename from projects/cli/schematics/collection.json rename to projects/cli/src/schematics/collection.json index 1d4f6df..4669708 100644 --- a/projects/cli/schematics/collection.json +++ b/projects/cli/src/schematics/collection.json @@ -1,5 +1,5 @@ { - "$schema": "../../../node_modules/@angular-devkit/schematics/collection-schema.json", + "$schema": "../../../../node_modules/@angular-devkit/schematics/collection-schema.json", "schematics": { "ng-add": { "description": "Add library to the project.", diff --git a/projects/cli/schematics/components/components-generator.ts b/projects/cli/src/schematics/components/components-generator.ts similarity index 100% rename from projects/cli/schematics/components/components-generator.ts rename to projects/cli/src/schematics/components/components-generator.ts diff --git a/projects/cli/schematics/components/files/avatar/avatar.component.scss b/projects/cli/src/schematics/components/files/avatar/avatar.component.scss similarity index 100% rename from projects/cli/schematics/components/files/avatar/avatar.component.scss rename to projects/cli/src/schematics/components/files/avatar/avatar.component.scss diff --git a/projects/cli/schematics/components/files/avatar/avatar.component.spec.ts b/projects/cli/src/schematics/components/files/avatar/avatar.component.spec.ts similarity index 100% rename from projects/cli/schematics/components/files/avatar/avatar.component.spec.ts rename to projects/cli/src/schematics/components/files/avatar/avatar.component.spec.ts diff --git a/projects/cli/schematics/components/files/avatar/avatar.component.ts b/projects/cli/src/schematics/components/files/avatar/avatar.component.ts similarity index 100% rename from projects/cli/schematics/components/files/avatar/avatar.component.ts rename to projects/cli/src/schematics/components/files/avatar/avatar.component.ts diff --git a/projects/cli/schematics/components/files/avatar/index.ts b/projects/cli/src/schematics/components/files/avatar/index.ts similarity index 100% rename from projects/cli/schematics/components/files/avatar/index.ts rename to projects/cli/src/schematics/components/files/avatar/index.ts diff --git a/projects/cli/schematics/components/files/badge/badge.component.scss b/projects/cli/src/schematics/components/files/badge/badge.component.scss similarity index 100% rename from projects/cli/schematics/components/files/badge/badge.component.scss rename to projects/cli/src/schematics/components/files/badge/badge.component.scss diff --git a/projects/cli/schematics/components/files/badge/badge.component.spec.ts b/projects/cli/src/schematics/components/files/badge/badge.component.spec.ts similarity index 100% rename from projects/cli/schematics/components/files/badge/badge.component.spec.ts rename to projects/cli/src/schematics/components/files/badge/badge.component.spec.ts diff --git a/projects/cli/schematics/components/files/badge/badge.component.ts b/projects/cli/src/schematics/components/files/badge/badge.component.ts similarity index 100% rename from projects/cli/schematics/components/files/badge/badge.component.ts rename to projects/cli/src/schematics/components/files/badge/badge.component.ts diff --git a/projects/cli/schematics/components/files/badge/index.ts b/projects/cli/src/schematics/components/files/badge/index.ts similarity index 100% rename from projects/cli/schematics/components/files/badge/index.ts rename to projects/cli/src/schematics/components/files/badge/index.ts diff --git a/projects/cli/schematics/components/files/button/button.component.scss b/projects/cli/src/schematics/components/files/button/button.component.scss similarity index 100% rename from projects/cli/schematics/components/files/button/button.component.scss rename to projects/cli/src/schematics/components/files/button/button.component.scss diff --git a/projects/cli/schematics/components/files/button/button.component.spec.ts b/projects/cli/src/schematics/components/files/button/button.component.spec.ts similarity index 100% rename from projects/cli/schematics/components/files/button/button.component.spec.ts rename to projects/cli/src/schematics/components/files/button/button.component.spec.ts diff --git a/projects/cli/schematics/components/files/button/button.component.ts b/projects/cli/src/schematics/components/files/button/button.component.ts similarity index 100% rename from projects/cli/schematics/components/files/button/button.component.ts rename to projects/cli/src/schematics/components/files/button/button.component.ts diff --git a/projects/cli/schematics/components/files/button/index.ts b/projects/cli/src/schematics/components/files/button/index.ts similarity index 100% rename from projects/cli/schematics/components/files/button/index.ts rename to projects/cli/src/schematics/components/files/button/index.ts diff --git a/projects/cli/schematics/components/files/checkbox/checkbox.component.html b/projects/cli/src/schematics/components/files/checkbox/checkbox.component.html similarity index 100% rename from projects/cli/schematics/components/files/checkbox/checkbox.component.html rename to projects/cli/src/schematics/components/files/checkbox/checkbox.component.html diff --git a/projects/cli/schematics/components/files/checkbox/checkbox.component.scss b/projects/cli/src/schematics/components/files/checkbox/checkbox.component.scss similarity index 100% rename from projects/cli/schematics/components/files/checkbox/checkbox.component.scss rename to projects/cli/src/schematics/components/files/checkbox/checkbox.component.scss diff --git a/projects/cli/schematics/components/files/checkbox/checkbox.component.spec.ts b/projects/cli/src/schematics/components/files/checkbox/checkbox.component.spec.ts similarity index 100% rename from projects/cli/schematics/components/files/checkbox/checkbox.component.spec.ts rename to projects/cli/src/schematics/components/files/checkbox/checkbox.component.spec.ts diff --git a/projects/cli/schematics/components/files/checkbox/checkbox.component.ts b/projects/cli/src/schematics/components/files/checkbox/checkbox.component.ts similarity index 100% rename from projects/cli/schematics/components/files/checkbox/checkbox.component.ts rename to projects/cli/src/schematics/components/files/checkbox/checkbox.component.ts diff --git a/projects/cli/schematics/components/files/checkbox/index.ts b/projects/cli/src/schematics/components/files/checkbox/index.ts similarity index 100% rename from projects/cli/schematics/components/files/checkbox/index.ts rename to projects/cli/src/schematics/components/files/checkbox/index.ts diff --git a/projects/cli/schematics/components/files/pin/index.ts b/projects/cli/src/schematics/components/files/pin/index.ts similarity index 100% rename from projects/cli/schematics/components/files/pin/index.ts rename to projects/cli/src/schematics/components/files/pin/index.ts diff --git a/projects/cli/schematics/components/files/pin/pin.component.scss b/projects/cli/src/schematics/components/files/pin/pin.component.scss similarity index 100% rename from projects/cli/schematics/components/files/pin/pin.component.scss rename to projects/cli/src/schematics/components/files/pin/pin.component.scss diff --git a/projects/cli/schematics/components/files/pin/pin.component.spec.ts b/projects/cli/src/schematics/components/files/pin/pin.component.spec.ts similarity index 100% rename from projects/cli/schematics/components/files/pin/pin.component.spec.ts rename to projects/cli/src/schematics/components/files/pin/pin.component.spec.ts diff --git a/projects/cli/schematics/components/files/pin/pin.component.ts b/projects/cli/src/schematics/components/files/pin/pin.component.ts similarity index 100% rename from projects/cli/schematics/components/files/pin/pin.component.ts rename to projects/cli/src/schematics/components/files/pin/pin.component.ts diff --git a/projects/cli/schematics/components/files/radio/index.ts b/projects/cli/src/schematics/components/files/radio/index.ts similarity index 100% rename from projects/cli/schematics/components/files/radio/index.ts rename to projects/cli/src/schematics/components/files/radio/index.ts diff --git a/projects/cli/schematics/components/files/radio/radio.component.html b/projects/cli/src/schematics/components/files/radio/radio.component.html similarity index 100% rename from projects/cli/schematics/components/files/radio/radio.component.html rename to projects/cli/src/schematics/components/files/radio/radio.component.html diff --git a/projects/cli/schematics/components/files/radio/radio.component.scss b/projects/cli/src/schematics/components/files/radio/radio.component.scss similarity index 100% rename from projects/cli/schematics/components/files/radio/radio.component.scss rename to projects/cli/src/schematics/components/files/radio/radio.component.scss diff --git a/projects/cli/schematics/components/files/radio/radio.component.spec.ts b/projects/cli/src/schematics/components/files/radio/radio.component.spec.ts similarity index 100% rename from projects/cli/schematics/components/files/radio/radio.component.spec.ts rename to projects/cli/src/schematics/components/files/radio/radio.component.spec.ts diff --git a/projects/cli/schematics/components/files/radio/radio.component.ts b/projects/cli/src/schematics/components/files/radio/radio.component.ts similarity index 100% rename from projects/cli/schematics/components/files/radio/radio.component.ts rename to projects/cli/src/schematics/components/files/radio/radio.component.ts diff --git a/projects/cli/schematics/components/files/switch/index.ts b/projects/cli/src/schematics/components/files/switch/index.ts similarity index 100% rename from projects/cli/schematics/components/files/switch/index.ts rename to projects/cli/src/schematics/components/files/switch/index.ts diff --git a/projects/cli/schematics/components/files/switch/zen-switch.component.html b/projects/cli/src/schematics/components/files/switch/zen-switch.component.html similarity index 100% rename from projects/cli/schematics/components/files/switch/zen-switch.component.html rename to projects/cli/src/schematics/components/files/switch/zen-switch.component.html diff --git a/projects/cli/schematics/components/files/switch/zen-switch.component.scss b/projects/cli/src/schematics/components/files/switch/zen-switch.component.scss similarity index 100% rename from projects/cli/schematics/components/files/switch/zen-switch.component.scss rename to projects/cli/src/schematics/components/files/switch/zen-switch.component.scss diff --git a/projects/cli/schematics/components/files/switch/zen-switch.component.spec.ts b/projects/cli/src/schematics/components/files/switch/zen-switch.component.spec.ts similarity index 100% rename from projects/cli/schematics/components/files/switch/zen-switch.component.spec.ts rename to projects/cli/src/schematics/components/files/switch/zen-switch.component.spec.ts diff --git a/projects/cli/schematics/components/files/switch/zen-switch.component.ts b/projects/cli/src/schematics/components/files/switch/zen-switch.component.ts similarity index 100% rename from projects/cli/schematics/components/files/switch/zen-switch.component.ts rename to projects/cli/src/schematics/components/files/switch/zen-switch.component.ts diff --git a/projects/cli/schematics/components/files/tag/index.ts b/projects/cli/src/schematics/components/files/tag/index.ts similarity index 100% rename from projects/cli/schematics/components/files/tag/index.ts rename to projects/cli/src/schematics/components/files/tag/index.ts diff --git a/projects/cli/schematics/components/files/tag/tag.component.scss b/projects/cli/src/schematics/components/files/tag/tag.component.scss similarity index 100% rename from projects/cli/schematics/components/files/tag/tag.component.scss rename to projects/cli/src/schematics/components/files/tag/tag.component.scss diff --git a/projects/cli/schematics/components/files/tag/tag.component.spec.ts b/projects/cli/src/schematics/components/files/tag/tag.component.spec.ts similarity index 100% rename from projects/cli/schematics/components/files/tag/tag.component.spec.ts rename to projects/cli/src/schematics/components/files/tag/tag.component.spec.ts diff --git a/projects/cli/schematics/components/files/tag/tag.component.ts b/projects/cli/src/schematics/components/files/tag/tag.component.ts similarity index 100% rename from projects/cli/schematics/components/files/tag/tag.component.ts rename to projects/cli/src/schematics/components/files/tag/tag.component.ts diff --git a/projects/cli/schematics/components/index.ts b/projects/cli/src/schematics/components/index.ts similarity index 80% rename from projects/cli/schematics/components/index.ts rename to projects/cli/src/schematics/components/index.ts index 064f419..09ebafb 100644 --- a/projects/cli/schematics/components/index.ts +++ b/projects/cli/src/schematics/components/index.ts @@ -1,6 +1,6 @@ import { chain, Rule } from '@angular-devkit/schematics'; -import { applyFileTemplateUtil } from '../_utils/apply-file-template.util'; +import { applyFileTemplateUtil } from '../../utils'; import { ComponentGeneratorSchema } from './components-generator'; export function componentGenerator(options: ComponentGeneratorSchema): Rule { diff --git a/projects/cli/schematics/components/schema.json b/projects/cli/src/schematics/components/schema.json similarity index 100% rename from projects/cli/schematics/components/schema.json rename to projects/cli/src/schematics/components/schema.json diff --git a/projects/cli/schematics/components/templates/README.md.template b/projects/cli/src/schematics/components/templates/README.md.template similarity index 100% rename from projects/cli/schematics/components/templates/README.md.template rename to projects/cli/src/schematics/components/templates/README.md.template diff --git a/projects/cli/schematics/directives/directives-generator.ts b/projects/cli/src/schematics/directives/directives-generator.ts similarity index 100% rename from projects/cli/schematics/directives/directives-generator.ts rename to projects/cli/src/schematics/directives/directives-generator.ts diff --git a/projects/cli/schematics/directives/files/disabled/disabled.directive.spec.ts b/projects/cli/src/schematics/directives/files/disabled/disabled.directive.spec.ts similarity index 100% rename from projects/cli/schematics/directives/files/disabled/disabled.directive.spec.ts rename to projects/cli/src/schematics/directives/files/disabled/disabled.directive.spec.ts diff --git a/projects/cli/schematics/directives/files/disabled/disabled.directive.ts b/projects/cli/src/schematics/directives/files/disabled/disabled.directive.ts similarity index 100% rename from projects/cli/schematics/directives/files/disabled/disabled.directive.ts rename to projects/cli/src/schematics/directives/files/disabled/disabled.directive.ts diff --git a/projects/cli/schematics/directives/files/disabled/index.ts b/projects/cli/src/schematics/directives/files/disabled/index.ts similarity index 100% rename from projects/cli/schematics/directives/files/disabled/index.ts rename to projects/cli/src/schematics/directives/files/disabled/index.ts diff --git a/projects/cli/schematics/directives/index.ts b/projects/cli/src/schematics/directives/index.ts similarity index 80% rename from projects/cli/schematics/directives/index.ts rename to projects/cli/src/schematics/directives/index.ts index 9253e09..b3cb350 100644 --- a/projects/cli/schematics/directives/index.ts +++ b/projects/cli/src/schematics/directives/index.ts @@ -1,6 +1,6 @@ import { chain, Rule } from '@angular-devkit/schematics'; -import { applyFileTemplateUtil } from '../_utils/apply-file-template.util'; +import { applyFileTemplateUtil } from '../../utils'; import { DirectiveGeneratorSchema } from './directives-generator'; export function directiveGenerator(options: DirectiveGeneratorSchema): Rule { diff --git a/projects/cli/schematics/directives/schema.json b/projects/cli/src/schematics/directives/schema.json similarity index 100% rename from projects/cli/schematics/directives/schema.json rename to projects/cli/src/schematics/directives/schema.json diff --git a/projects/cli/schematics/directives/templates/README.md.template b/projects/cli/src/schematics/directives/templates/README.md.template similarity index 100% rename from projects/cli/schematics/directives/templates/README.md.template rename to projects/cli/src/schematics/directives/templates/README.md.template diff --git a/projects/cli/schematics/ng-add/index.ts b/projects/cli/src/schematics/ng-add/index.ts similarity index 84% rename from projects/cli/schematics/ng-add/index.ts rename to projects/cli/src/schematics/ng-add/index.ts index b37a9d4..efd914c 100644 --- a/projects/cli/schematics/ng-add/index.ts +++ b/projects/cli/src/schematics/ng-add/index.ts @@ -1,6 +1,6 @@ import { Rule, SchematicContext, Tree } from '@angular-devkit/schematics'; -import { addPathToTsconfigUtil } from '../_utils/add-path-to-tsconfig.util'; +import { addPathToTsconfigUtil } from '../../utils'; import { NgZenGeneratorSchema } from './ng-zen-generator'; export function ngAdd(options: NgZenGeneratorSchema): Rule { diff --git a/projects/cli/schematics/ng-add/ng-zen-generator.ts b/projects/cli/src/schematics/ng-add/ng-zen-generator.ts similarity index 100% rename from projects/cli/schematics/ng-add/ng-zen-generator.ts rename to projects/cli/src/schematics/ng-add/ng-zen-generator.ts diff --git a/projects/cli/schematics/ng-add/schema.json b/projects/cli/src/schematics/ng-add/schema.json similarity index 100% rename from projects/cli/schematics/ng-add/schema.json rename to projects/cli/src/schematics/ng-add/schema.json diff --git a/projects/cli/schematics/_utils/add-path-to-tsconfig.util.ts b/projects/cli/src/utils/add-path-to-tsconfig.util.ts similarity index 100% rename from projects/cli/schematics/_utils/add-path-to-tsconfig.util.ts rename to projects/cli/src/utils/add-path-to-tsconfig.util.ts diff --git a/projects/cli/schematics/_utils/apply-file-template.util.ts b/projects/cli/src/utils/apply-file-template.util.ts similarity index 100% rename from projects/cli/schematics/_utils/apply-file-template.util.ts rename to projects/cli/src/utils/apply-file-template.util.ts diff --git a/projects/cli/src/utils/index.ts b/projects/cli/src/utils/index.ts new file mode 100644 index 0000000..caeefb9 --- /dev/null +++ b/projects/cli/src/utils/index.ts @@ -0,0 +1,2 @@ +export * from './add-path-to-tsconfig.util'; +export * from './apply-file-template.util'; diff --git a/projects/cli/tsconfig.schematics.json b/projects/cli/tsconfig.schematics.json index 9bbe00a..2853603 100644 --- a/projects/cli/tsconfig.schematics.json +++ b/projects/cli/tsconfig.schematics.json @@ -12,8 +12,8 @@ "noImplicitThis": true, "noUnusedParameters": true, "noUnusedLocals": true, - "rootDir": "schematics", - "outDir": "../../dist/@ng-zen/cli/schematics", + "rootDir": "src", + "outDir": "../../dist/@ng-zen/cli/src", "skipDefaultLibCheck": true, "skipLibCheck": true, "sourceMap": true, @@ -21,6 +21,6 @@ "target": "es6", "types": ["jest", "node"] }, - "include": ["schematics/**/*"], - "exclude": ["schematics/*/files/**/*"] + "include": ["src/**/*"], + "exclude": ["src/schematics/*/files/**/*"] } diff --git a/tsconfig.json b/tsconfig.json index c83e6e7..5833d7b 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -20,8 +20,12 @@ "useDefineForClassFields": false, "lib": ["ES2022", "dom"], "paths": { - "ng-zen/components/*": ["./projects/cli/schematics/components/files/*"], - "ng-zen/directives/*": ["./projects/cli/schematics/directives/files/*"] + "ng-zen/components/*": [ + "./projects/cli/src/schematics/components/files/*" + ], + "ng-zen/directives/*": [ + "./projects/cli/src/schematics/directives/files/*" + ] } }, "angularCompilerOptions": {