Skip to content

Commit

Permalink
Merge pull request #29 from qmonmert/refacto
Browse files Browse the repository at this point in the history
fix: 🐛 (parser) rename validtor in validator
  • Loading branch information
nivekcode authored Aug 6, 2024
2 parents 1578f1f + d5e656c commit 40231a0
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ ng-parsel offers the following configurations.
| parseDirectives | true | If set to `true` ng-parsel will parse Angular Directives and include them in the output. |
| parseModules | true | If set to true ng-parsel will parse Angular Modules and include them in the output. |
| parseHarnesses | true | If set to true ng-parsel will parse Harness test files (all files ending with `.harness.ts`) and include them in the output. |
| parseValidators | true | If set to true ng-parsel will parse Validators (all files ending with `.validtor.ts`) and include them in the output. |
| parseValidators | true | If set to true ng-parsel will parse Validators (all files ending with `.validator.ts`) and include them in the output. |
| parseSpecs | true | If set to true ng-parsel will parse testing files (all files ending with `.spec.ts`) and include them in the output. |
| singleFile | true | If set to to `true` the output will be written to a `ng-parsel.json` file in the output directory. If set to false, ng-parsel will generate multiple output files, one for each `componentType`. (Find out more on component types in the [next section](#component-type)) |

Expand Down
6 changes: 3 additions & 3 deletions src/parser/parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import { NgParselSpec } from './spec/spec.model.js';
import { NgParselPipe } from './pipe/pipe.model.js';
import { parseHarnesses } from './harness/harness.parser.js';
import { parseValidator } from './validator/validator.parser.js';
import { NgParselValidtor } from './validator/validator.model.js';
import { NgParselValidator } from './validator/validator.model.js';
import { NgParselService } from './services/service.model.js';
import { parseService } from './services/service.parser.js';

Expand All @@ -30,7 +30,7 @@ export function parse(configuration: NgParselConfig): void {

let ngParselComponents: NgParselComponent[] = [],
ngParselSpecs: NgParselSpec[] = [],
ngParselValidators: NgParselValidtor[] = [],
ngParselValidators: NgParselValidator[] = [],
ngParselHarnesses: NgParselHarness[] = [],
ngParselPipes: NgParselPipe[] = [],
ngParselModules: NgParselModule[] = [],
Expand Down Expand Up @@ -114,7 +114,7 @@ function writeOutputFiles(
ngParselSpecs: NgParselSpec[],
ngParselHarnesses: NgParselHarness[],
ngParselPipes: NgParselPipe[],
ngParselValidators: NgParselValidtor[]
ngParselValidators: NgParselValidator[]
): void {
if (!existsSync(config.out as string)) {
mkdirSync(config.out as string, { recursive: true });
Expand Down
2 changes: 1 addition & 1 deletion src/parser/validator/validator.model.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { NgParselOutput } from '../shared/model/types.model.js';
import { NgParselMethod } from '../shared/model/method.model.js';

export interface NgParselValidtor extends NgParselOutput {
export interface NgParselValidator extends NgParselOutput {
methodsPublicExplicit: NgParselMethod[];
}
4 changes: 2 additions & 2 deletions src/parser/validator/validator.parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import { parseClassName } from '../shared/parser/class.parser.js';
import { NgParselOutputType } from '../shared/model/types.model.js';
import { parseExplicitPublicMethods } from '../shared/parser/method.parser.js';

import { NgParselValidtor } from './validator.model.js';
import { NgParselValidator } from './validator.model.js';

export function parseValidator(ast: ts.SourceFile, validatorFilePath: string): NgParselValidtor {
export function parseValidator(ast: ts.SourceFile, validatorFilePath: string): NgParselValidator {
return {
className: parseClassName(ast),
filePath: validatorFilePath,
Expand Down

0 comments on commit 40231a0

Please sign in to comment.