Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • MajoContext

Index

Constructors

constructor

Accessors

fileList

fileList:

Get an array of sorted file paths

Methods

createFile

  • createFile(relativePath: string, file: File): this
  • Create a new file

    Parameters

    • relativePath: string

      Relative path

    • file: File

    Returns this

deleteFile

  • deleteFile(relativePath: string): this
  • Delete a file

    Parameters

    • relativePath: string

      Relative path

    Returns this

file

  • file(relativePath: string): File
  • Get a file by relativePath path

    Parameters

    • relativePath: string

      Relative path

    Returns File

fileContents

  • fileContents(relativePath: string): string
  • Get file contents as a UTF-8 string

    Parameters

    • relativePath: string

      Relative path

    Returns string

fileStats

  • fileStats(relativePath: string): Stats
  • Get the fs.Stats object of specified file

    para

    relativePath Relative path

    Parameters

    • relativePath: string

    Returns Stats

rename

  • rename(fromPath: string, toPath: string): this
  • Parameters

    • fromPath: string
    • toPath: string

    Returns this

transform

  • Transform file at given path

    Parameters

    Returns Promise<void>

writeContents

  • writeContents(relativePath: string, contents: string): this
  • Write contents to specific file

    Parameters

    • relativePath: string

      Relative path

    • contents: string

    Returns this

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Type alias with type parameter
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc