Options
All
  • Public
  • Public/Protected
  • All
Menu

Class InitCommand

Generates a new project with TypeORM.

Hierarchy

  • InitCommand

Implements

  • any

Index

Properties

command

command: string = "init"

describe

describe: string = "Generates initial TypeORM project structure. " +"If name specified then creates files inside directory called as name. " +"If its not specified then creates files inside current directory."

Methods

builder

  • builder(args: yargs.Argv): any

handler

  • handler(args: yargs.Arguments): Promise<void>

Static Protected appendPackageJson

  • appendPackageJson(packageJsonContents: string, database: string, express: boolean): string
  • Appends to a given package.json template everything needed.

    Parameters

    • packageJsonContents: string
    • database: string
    • express: boolean

    Returns string

Static Protected getAppIndexTemplate

  • getAppIndexTemplate(express: boolean): string
  • Gets contents of the main (index) application file.

    Parameters

    • express: boolean

    Returns string

Static Protected getControllerTemplate

  • getControllerTemplate(): string

Static Protected getDockerComposeTemplate

  • getDockerComposeTemplate(database: string): string

Static Protected getGitIgnoreFile

  • getGitIgnoreFile(): string

Static Protected getOrmConfigTemplate

  • getOrmConfigTemplate(database: string): string

Static Protected getPackageJsonTemplate

  • getPackageJsonTemplate(projectName?: string): string
  • Gets contents of the new package.json file.

    Parameters

    • Optional projectName: string

    Returns string

Static Protected getReadmeTemplate

  • getReadmeTemplate(options: object): string
  • Gets contents of the new readme.md file.

    Parameters

    • options: object
      • docker: boolean

    Returns string

Static Protected getRoutesTemplate

  • getRoutesTemplate(): string

Static Protected getTsConfigTemplate

  • getTsConfigTemplate(): string

Static Protected getUserEntityTemplate

  • getUserEntityTemplate(database: string): string

Generated using TypeDoc