Options
All
  • Public
  • Public/Protected
  • All
Menu

Class BreakStringProcess

Hierarchy

Implements

Index

Constructors

constructor

Properties

Private commonProcess

commonProcess: CommonProcess

Protected logger

logger: LoggerEvent

Methods

addHandlerAfterEmptyln

  • addHandlerAfterEmptyln(callback: (e: EventArgs) => void): void

addHandlerAfterEmptylnVerbose

  • addHandlerAfterEmptylnVerbose(callback: (e: EventArgs) => void): void

addHandlerAfterError

addHandlerAfterErrorVerbose

  • addHandlerAfterErrorVerbose(callback: (e: MsgEventAnyArgs) => void): void

addHandlerAfterWarn

addHandlerAfterWarnVerbose

addHandlerAfterWrite

addHandlerAfterWriteVerbose

  • addHandlerAfterWriteVerbose(callback: (e: MsgEventAnyArgs) => void): void

addHandlerAfterWriteln

addHandlerAfterWritelnVerbose

  • addHandlerAfterWritelnVerbose(callback: (e: MsgEventAnyArgs) => void): void

addHandlerBeforeEmptyln

addHandlerBeforeEmptylnVerbose

  • addHandlerBeforeEmptylnVerbose(callback: (e: CancelEventArgs) => void): void

addHandlerBeforeError

addHandlerBeforeErrorVerbose

  • addHandlerBeforeErrorVerbose(callback: (e: MsgEventAnyArgs) => void): void

addHandlerBeforeWarn

addHandlerBeforeWarnVerbose

  • addHandlerBeforeWarnVerbose(callback: (e: MsgEventAnyArgs) => void): void

addHandlerBeforeWrite

addHandlerBeforeWriteVerbose

  • addHandlerBeforeWriteVerbose(callback: (e: MsgEventAnyArgs) => void): void

addHandlerBeforeWriteln

addHandlerBeforeWritelnVerbose

  • addHandlerBeforeWritelnVerbose(callback: (e: MsgEventAnyArgs) => void): void

breakStringBeforeAfter

  • Appends Before and After to breakstring if they are set.

    Parameters

    • strInput: string

      input string

    • biOpt: IBuildIncludeOpt

      The arguments from the options string values

    Returns string

    strInput wrapend in before and after.

buildBreakString

  • Breaks a string into lines by Javascript or regular breaks

    Parameters

    • biOpt: IBuildIncludeOpt

      The arguments from the options string values The type of string nreaking will be terminde by args.asJsString

    Returns string[]

Private buildBreakStringJs

  • Builds a muli-line javascript string that has no padding before each line start. Padding can be applied after each line start and after each line.

    Parameters

    • biOpt: IBuildIncludeOpt

      TThe current options. This parameter is an object and will be potentially modified by this method.

      The returning string will have line ending escaped using
      The lines are built from hte args.lines value

    Returns string[]

buildBreakStringNormal

  • Builds a string into a multi-line string with each line seperated by \n

    Parameters

    • biOpt: IBuildIncludeOpt

      The arguments from the options string values

      The lines are built from the args.lines value.

      No padding is applied in this process

    Returns string

isOptionBreakStringSet

  • Checks opts for breakstring options and assigns any found options to biOpt

    description

    Potential options are as follows.

    Sets options for biOpt.bs

    width - The width is the number of characters to for each line. Default is 80
    break - The options of how to split the replacement file contents.
                  Default value is width
      break=width or break=0 - Split by Width
      break=word or break=1 - Split by Word
      break=line or break=2 - Split by Line
    eol - The options of how handle line endings of the replacement file contents.
             Default value is noLnBr
      eol=none or eol=0 - Take no action
      eol=noLnBr or eol=1 - Remove all line breaks
      eol=encode or eol=2 - Encode line breaks as \n

    see

    string-breaker

    example
    
    // BUILD_INCLUDE('../myfile.txt')[breakstring?width=100&eol=encode]
    // BUILD_INCLUDE('../myjavascript.js')[breakstring?break=line]

    Parameters

    • opts: string[]

      The array of options to search for break string options in

    • biOpt: IBuildIncludeOpt

      The current options. This parameter is an object and will be potentially modified by this method.

    Returns boolean

    true if opts has break string options; Otherwise, false.

registerLoggerEvents

  • registerLoggerEvents(loggerEvent: ILogger): void

removeHandlerAfterEmptyln

  • removeHandlerAfterEmptyln(callback: (e: EventArgs) => void): void

removeHandlerAfterEmptylnVerbose

  • removeHandlerAfterEmptylnVerbose(callback: (e: EventArgs) => void): void

removeHandlerAfterError

removeHandlerAfterErrorVerbose

  • removeHandlerAfterErrorVerbose(callback: (e: MsgEventAnyArgs) => void): void

removeHandlerAfterWarn

removeHandlerAfterWarnVerbose

  • removeHandlerAfterWarnVerbose(callback: (e: MsgEventAnyArgs) => void): void

removeHandlerAfterWrite

removeHandlerAfterWriteVerbose

  • removeHandlerAfterWriteVerbose(callback: (e: MsgEventAnyArgs) => void): void

removeHandlerAfterWriteln

removeHandlerAfterWritelnVerbose

  • removeHandlerAfterWritelnVerbose(callback: (e: MsgEventAnyArgs) => void): void

removeHandlerBeforeEmptyln

removeHandlerBeforeEmptylnVerbose

  • removeHandlerBeforeEmptylnVerbose(callback: (e: CancelEventArgs) => void): void

removeHandlerBeforeError

removeHandlerBeforeErrorVerbose

  • removeHandlerBeforeErrorVerbose(callback: (e: MsgEventAnyArgs) => void): void

removeHandlerBeforeWarn

removeHandlerBeforeWarnVerbose

  • removeHandlerBeforeWarnVerbose(callback: (e: MsgEventAnyArgs) => void): void

removeHandlerBeforeWrite

removeHandlerBeforeWriteVerbose

  • removeHandlerBeforeWriteVerbose(callback: (e: MsgEventAnyArgs) => void): void

removeHandlerBeforeWriteln

removeHandlerBeforeWritelnVerbose

  • removeHandlerBeforeWritelnVerbose(callback: (e: MsgEventAnyArgs) => void): void

unRegisterLoggerEvents

  • unRegisterLoggerEvents(loggerEvent: ILogger): void

Generated using TypeDoc