Skip to main content
Latest
method Directory.prototype.getRelativePathAsModuleSpecifierTo
import { Directory } from "https://deno.land/x/deno2node@v1.12.0/src/deps.deno.ts";

Gets the relative path to the specified file path as a module specifier.

Parameters

filePath: string
  • File path.

Returns

string

Gets the relative path to the specified source file as a module specifier.

Parameters

sourceFile: SourceFile
  • Source file.

Returns

string

Gets the relative path to the specified directory as a module specifier.

Parameters

directory: Directory
  • Directory.

Returns

string