Skip to content

Commit

Permalink
Fix folder name generation
Browse files Browse the repository at this point in the history
  • Loading branch information
arifszn committed Jul 1, 2024
1 parent 743cefe commit 5a52047
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions commands/generate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const command: GluegunCommand = {
const name = strings.pascalCase(resourceName); // UserAccount
const singularNameUpperCase = strings.singular(name);
const pluralizeNameUpperCase = strings.pluralize(name);
const singularNameLowerCase = strings.camelCase(name);
const singularNameLowerCase = strings.camelCase(singularNameUpperCase);
const pluralizeNameLowerCase = strings.camelCase(pluralizeNameUpperCase);

// Prompt for file types to generate
Expand Down Expand Up @@ -59,7 +59,7 @@ const command: GluegunCommand = {
const stubPath = path.join(stubDir, `${fileType}.ts.stub`);
const outputPath = path.join(
outputDir,
`${fileType}s`,
`${strings.pluralize(fileType)}`,
`${singularNameLowerCase}.${fileType}.ts`,
);

Expand Down
2 changes: 1 addition & 1 deletion stubs/entity.ts.stub
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export class Article {
id: number;

@Column()
example_column: string;
name: string;

@ManyToOne(() => User, {
eager: true,
Expand Down

0 comments on commit 5a52047

Please sign in to comment.