Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Context

Hierarchy

  • Context

Implements

Index

Constructors

constructor

  • new Context(__namedParameters: object): Context
  • Parameters

    • __namedParameters: object
      • fs: FileSystem
      • make: function
          • Parameters

            • target: string

            Returns Promise<TimeStamp>

      • match: null | RegExpExecArray
      • root: string
      • target: string

    Returns Context

Properties

dependencies

dependencies: string[] = []

dynamicDependencies

dynamicDependencies: string[] = []

Private fs

logger

logger: Logger = Logger.getOrCreate()

Private makeImpl

makeImpl: function

Type declaration

    • Parameters

      • target: string

      Returns Promise<TimeStamp>

match

match: RegExpExecArray | null

Private root

root: string

target

target: string

Methods

dependencyFullPath

  • dependencyFullPath(i?: number): string
  • Parameters

    • Default value i: number = 0

    Returns string

dependencyPath

  • dependencyPath(i?: number): string
  • Parameters

    • Default value i: number = 0

    Returns string

existsSync

  • existsSync(filepath: string): boolean

make

  • make(target: string): Promise<number>
  • Parameters

    • target: string

    Returns Promise<number>

mkdir

  • mkdir(filepath: string, options: number | string | MakeDirectoryOptions | null): Promise<void>
  • Parameters

    • filepath: string
    • Optional options: number | string | MakeDirectoryOptions | null

    Returns Promise<void>

mkdirSync

  • mkdirSync(filepath: string, options: number | string | MakeDirectoryOptions | null): void

outputFile

  • outputFile(filepath: string, content: string | Buffer): Promise<void>
  • Parameters

    • filepath: string
    • content: string | Buffer

    Returns Promise<void>

outputFileSync

  • outputFileSync(filepath: string, content: string | Buffer): void
  • Parameters

    • filepath: string
    • content: string | Buffer

    Returns void

readDependency

  • readDependency(i?: number): Promise<string>
  • Parameters

    • Default value i: number = 0

    Returns Promise<string>

readDependencySync

  • readDependencySync(i?: number): string
  • Parameters

    • Default value i: number = 0

    Returns string

readFile

  • readFile(filepath: string, encoding: undefined | string): Promise<string>

readFileSync

  • readFileSync(filepath: string, encoding: string): string

stat

  • stat(filepath: string): Promise<Stats>

statSync

  • statSync(filepath: string): Stats

targetFullPath

  • targetFullPath(): string

targetPath

  • targetPath(): string

toFullPath

  • toFullPath(filename: string): string
  • Parameters

    • filename: string

    Returns string

unlink

  • unlink(filepath: string): Promise<void>

unlinkSync

  • unlinkSync(filepath: string): void

utimes

  • utimes(filepath: string, atime: number, utime: number): Promise<void>

utimesSync

  • utimesSync(filepath: string, atime: number, utime: number): void

writeFile

  • writeFile(filepath: string, content: string | Buffer): Promise<void>

writeFileSync

  • writeFileSync(filepath: string, content: string | Buffer): void

writeTarget

  • writeTarget(content: string): Promise<void>
  • Parameters

    • content: string

    Returns Promise<void>

writeTargetSync

  • writeTargetSync(content: string): void
  • Parameters

    • content: string

    Returns void

Generated using TypeDoc