Charles Lyding 37a06a7c37 build: format all files
All files are now formatted using the ng-dev tools via prettier.
2021-04-28 16:05:49 -07:00

20 lines
484 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.io/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();
}