Options
All
  • Public
  • Public/Protected
  • All
Menu

Class TemplateWriter

Hierarchy

  • TemplateWriter

Index

Constructors

constructor

Methods

add

  • add(file: string | false | 0 | undefined | null, contents: string, mode: "notexist" | "replace" | "ignore", report?: boolean): this
  • Parameters

    • file: string | false | 0 | undefined | null
    • contents: string
    • mode: "notexist" | "replace" | "ignore"

      What to do if the file already exists

    • Default value report: boolean = true

      Whether to report the changes to the file

    Returns this

addJSON

  • addJSON(file: string | false | 0 | undefined | null, contents: any, mode: "notexist" | "replace" | "mergebefore" | "mergeafter" | "ignore", report?: boolean): this
  • Parameters

    • file: string | false | 0 | undefined | null
    • contents: any
    • mode: "notexist" | "replace" | "mergebefore" | "mergeafter" | "ignore"

      What to do if the file already exists

    • Default value report: boolean = true

      Whether to report the changes to the file

    Returns this

create

  • create(): []
  • Returns []

message

  • message(file: string, message: string, color?: keyof typeof chalk): string
  • Parameters

    • file: string
    • message: string
    • Default value color: keyof typeof chalk = "strip"

    Returns string

updateJSON

  • updateJSON(file: string | false | 0 | undefined | null, contents: any, report: string | undefined | false): this
  • Parameters

    • file: string | false | 0 | undefined | null
    • contents: any
    • report: string | undefined | false

      What to report on success, false or undefined to skip

    Returns this

Generated using TypeDoc