Module

x/fresh/src/dev/deps.ts>Project#createSourceFile

The next-gen web framework.
Extremely Popular
Go to Latest
method Project.prototype.createSourceFile
import { Project } from "https://dotland.deno.dev/x/fresh@1.1.5/src/dev/deps.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.

Returns

SourceFile