import { Project } from "https://deno.land/x/fresh@1.6.1/src/dev/deps.ts";
Project that holds source files.
Methods
Adds an existing directory from the path or throws if it doesn't exist.
Will return the directory if it was already added.
Adds an existing directory from the path or returns undefined if it doesn't exist.
Will return the directory if it was already added.
Adds an existing source file from a file path or throws if it doesn't exist.
Will return the source file if it was already added.
Adds a source file from a file path if it exists or returns undefined.
Will return the source file if it was already added.
Adds source files based on file globs.
Adds all the source files from the specified tsconfig.json.
Note that this is done by default when specifying a tsconfig file in the constructor and not explicitly setting the
skipAddingFilesFromTsConfig
option to true
.
Creates a directory at the specified path.
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.
Creates a writer with the current manipulation settings.
Asynchronously emits all the source files to the file system as JavaScript files.
Synchronously emits all the source files to the file system as JavaScript files.
Emits all the source files to memory.
Enables logging to the console.
Forgets the nodes created in the scope of the passed in block.
This is an advanced method that can be used to easily "forget" all the nodes created within the scope of the block.
Forgets the nodes created in the scope of the passed in block asynchronously.
This is an advanced method that can be used to easily "forget" all the nodes created within the scope of the block.
Formats an array of diagnostics with their color and context into a string.
Gets the specified ambient module symbol or returns undefined if not found.
Gets the specified ambient module symbol or throws if not found.
Gets the ambient module symbols (ex. modules in the
Gets the compiler options.
Gets the diagnostics found when parsing the tsconfig.json file provided in the project's constructor.
Gets all the directories.
Gets a directory by the specified path or returns undefined if it doesn't exist.
Gets a directory by the specified path or throws if it doesn't exist.
Gets the file system.
Gets the language service.
Gets a ts.ModuleResolutionHost for the project.
Gets the pre-emit diagnostics.
Gets the program.
Gets the directories without a parent.
Gets a source file by a file name or file path. Returns undefined if none exists.
Gets a source file by a search function. Returns undefined if none exists.
Gets a source file by a file name or file path. Throws an error if it doesn't exist.
Gets a source file by a search function. Throws an error if it doesn't exist.
Gets all the source files added to the project.
Gets all the source files added to the project that match a pattern.
Gets all the source files added to the project that match the passed in patterns.
Gets the type checker.
Removes a source file from the project.
Adds the source files the project's source files depend on to the project.
Saves all the unsaved source files to the file system and deletes all deleted files.
Synchronously saves all the unsaved source files to the file system and deletes all deleted files.
Remarks: This might be very slow compared to the asynchronous version if there are a lot of files.