Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Namespaces

Functions

Functions

Const cleandir

  • cleandir(dirPath: fs.PathLike): Command
  • Removes all contents of a directory, or creates the directory if absent. (Actually it tries rmdir() and then mkdir()).

    Parameters

    • dirPath: fs.PathLike

    Returns Command

Const echo

  • Creates an echo command (actually it writes to process.stdout directly instead of echo).

    Parameters

    • s: string

    Returns Command

Const editFile

  • editFile(path: string, convert: (data: string) => string, encoding?: BufferEncoding): Command
  • Creates a Command that edits a file by readFile() and writeFile(). Does not use stream so not suited for huge files.

    Parameters

    • path: string
    • convert: (data: string) => string
        • (data: string): string
        • Parameters

          • data: string

          Returns string

    • encoding: BufferEncoding = "utf8"

    Returns Command

Legend

Generated using TypeDoc