(path: string, tree: Tree)
| 19 | }; |
| 20 | |
| 21 | export function safeReadJSON(path: string, tree: Tree) { |
| 22 | try { |
| 23 | // eslint-disable-next-line @typescript-eslint/no-non-null-assertion |
| 24 | return JSON.parse(tree.read(path)!.toString()); |
| 25 | } catch (e) { |
| 26 | throw new SchematicsException(`Error when parsing ${path}: ${e.message}`); |
| 27 | } |
| 28 | } |
| 29 | |
| 30 | export const addDependencies = ( |
| 31 | host: Tree, |
no outgoing calls
no test coverage detected