(block: string, structure: unknown)
| 194 | } |
| 195 | |
| 196 | export async function writeBlockStructure(block: string, structure: unknown) { |
| 197 | // dynamically importing prettier because Gatsby build and develop fail when |
| 198 | // it's required. |
| 199 | const prettier = await import('prettier'); |
| 200 | const content = await prettier.format(JSON.stringify(structure), { |
| 201 | parser: 'json' |
| 202 | }); |
| 203 | await writeFile(getBlockStructurePath(block), content, 'utf8'); |
| 204 | } |
| 205 | |
| 206 | export async function writeSuperblockStructure( |
| 207 | superblock: string, |
no test coverage detected