Skip to main content
Module

x/deno2node/src/deps.deno.ts>Directory#createSourceFile

Compile your Deno project to run on Node.js.
Go to Latest
method Directory.prototype.createSourceFile
import { Directory } from "https://deno.land/x/deno2node@v1.7.1/src/deps.deno.ts";

Creates a source file, relative to this directory.

Note: The file will not be created and saved to the file system until .save() is called on the source file.

Parameters

relativeFilePath: string
  • Relative file path of the source file to create.
optional
sourceFileText: string | OptionalKind<SourceFileStructure> | WriterFunction
  • Text, structure, or writer function to create the source file text with.
optional
options: SourceFileCreateOptions
  • Options.