utils.d.ts 1.3 KB

12345678910111213141516171819202122
  1. /**
  2. * @license
  3. * Copyright Google Inc. All Rights Reserved.
  4. *
  5. * Use of this source code is governed by an MIT-style license that can be
  6. * found in the LICENSE file at https://angular.io/license
  7. */
  8. import { JsonAstObject } from '@angular-devkit/core';
  9. import { Tree } from '@angular-devkit/schematics';
  10. import { Builders, WorkspaceTargets } from '../../utility/workspace-models';
  11. /** Get a project target which builder and target names matches the provided. */
  12. export declare function getProjectTarget(project: JsonAstObject, targetName: Exclude<keyof WorkspaceTargets, number>, builderName: Builders): JsonAstObject | undefined;
  13. export declare function getTargets(workspace: JsonAstObject, targetName: Exclude<keyof WorkspaceTargets, number>, builderName: Builders): {
  14. target: JsonAstObject;
  15. project: JsonAstObject;
  16. }[];
  17. /** Helper to retreive all the options in various configurations. */
  18. export declare function getAllOptions(builderConfig: JsonAstObject, configurationsOnly?: boolean): JsonAstObject[];
  19. export declare function getWorkspace(host: Tree): JsonAstObject;
  20. export declare function readJsonFileAsAstObject(host: Tree, path: string): JsonAstObject | undefined;
  21. export declare function isIvyEnabled(tree: Tree, tsConfigPath: string): boolean;
  22. export declare function forwardSlashPath(path: string): string;