mirror of
https://github.com/angular/angular-cli.git
synced 2025-05-19 04:26:01 +08:00
Updates for all angular.io links to the new angular.dev domain. Additionally, adjustment to new resources where the equivalent does not exist on the new site (e.g. Tour of Heroes tutorial)
20 lines
485 B
TypeScript
20 lines
485 B
TypeScript
/**
|
|
* @license
|
|
* Copyright Google LLC All Rights Reserved.
|
|
*
|
|
* Use of this source code is governed by an MIT-style license that can be
|
|
* found in the LICENSE file at https://angular.dev/license
|
|
*/
|
|
|
|
import { Tree } from '@angular-devkit/schematics';
|
|
|
|
export function getFileContent(tree: Tree, path: string): string {
|
|
const fileEntry = tree.get(path);
|
|
|
|
if (!fileEntry) {
|
|
throw new Error(`The file (${path}) does not exist.`);
|
|
}
|
|
|
|
return fileEntry.content.toString();
|
|
}
|