MCPcopy
hub / github.com/angular/angular-cli / getSourceFile

Function getSourceFile

packages/schematics/angular/app-shell/index.ts:33–38  ·  view source on GitHub ↗
(host: Tree, path: string)

Source from the content-addressed store, hash-verified

31import { Schema as AppShellOptions } from './schema';
32
33function getSourceFile(host: Tree, path: string): ts.SourceFile {
34 const content = host.readText(path);
35 const source = ts.createSourceFile(path, content, ts.ScriptTarget.Latest, true);
36
37 return source;
38}
39
40function getServerModulePath(host: Tree, sourceRoot: string, mainPath: string): string | null {
41 const mainSource = getSourceFile(host, join(sourceRoot, mainPath));

Callers 4

getServerModulePathFunction · 0.70
getComponentTemplateInfoFunction · 0.70
addServerRoutingConfigFunction · 0.70

Calls 1

readTextMethod · 0.65

Tested by

no test coverage detected