Skip to main content
Module

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

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

Creates a source file at the specified file path with the specified text.

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

Parameters

filePath: string
  • File path of the source file.
optional
sourceFileText: string | OptionalKind<SourceFileStructure> | WriterFunction
  • Text, structure, or writer function for the source file text.
optional
options: SourceFileCreateOptions
  • Options.