Options
All
  • Public
  • Public/Protected
  • All
Menu

Module loader

Index

Functions

findPackageJson

  • findPackageJson(dir: string): null | string
  • Find nearest package.json file

    Parameters

    • dir: string

    Returns null | string

    Path to package.json or null if not found

importFile

  • importFile(file: string, moduleType: "commonjs" | "module"): Promise<any>
  • Load module via CommonJS or ES Modules depending on the environment

    Parameters

    • file: string
    • moduleType: "commonjs" | "module"

    Returns Promise<any>

Generated using TypeDoc