Skip to content

Commit

Permalink
refactor: move code to src folder
Browse files Browse the repository at this point in the history
  • Loading branch information
Kordrad committed Jul 11, 2024
1 parent 166d099 commit f91a029
Show file tree
Hide file tree
Showing 56 changed files with 18 additions and 12 deletions.
4 changes: 2 additions & 2 deletions projects/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -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.",
Expand Down
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
File renamed without changes.
2 changes: 2 additions & 0 deletions projects/cli/src/utils/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export * from './add-path-to-tsconfig.util';
export * from './apply-file-template.util';
8 changes: 4 additions & 4 deletions projects/cli/tsconfig.schematics.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@
"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,
"strictNullChecks": true,
"target": "es6",
"types": ["jest", "node"]
},
"include": ["schematics/**/*"],
"exclude": ["schematics/*/files/**/*"]
"include": ["src/**/*"],
"exclude": ["src/schematics/*/files/**/*"]
}
8 changes: 6 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down

0 comments on commit f91a029

Please sign in to comment.