@ngx-ext/schematics-api
Version:
Set of tools wrapping Angular Schematics.
14 lines (13 loc) • 1.11 kB
TypeScript
import { WorkspaceProject, WorkspaceSchema, WorkspaceTargets } from '@schematics/angular/utility/workspace-models';
import * as ts from '@schematics/angular/third_party/github.com/Microsoft/TypeScript/lib/typescript';
import { Host } from '@schematics/angular/utility/change';
import { Tree } from '@angular-devkit/schematics';
/** Resolves the architect options for the build target of the given project. */
export declare function getProjectTargetOptions<BuildTarget extends keyof WorkspaceTargets>(project: WorkspaceProject, buildTarget: BuildTarget): WorkspaceTargets[BuildTarget]['options'];
export declare function getWorkspace(host: Tree): WorkspaceSchema;
/** Looks for the main TypeScript file in the given project and returns its path. */
export declare function getProjectMainFilePath(project: WorkspaceProject): string;
export declare function getDefaultProjectRootModulePath(tree: Tree): string;
/** Reads file given path and returns TypeScript source file. */
export declare function getSourceFile(host: Tree, path: string): ts.SourceFile;
export declare function createHost(tree: Tree): Host;