( superBlock: SuperBlocks, block: string, title: string )
| 45 | } |
| 46 | |
| 47 | async function updateIntroJson( |
| 48 | superBlock: SuperBlocks, |
| 49 | block: string, |
| 50 | title: string |
| 51 | ) { |
| 52 | const introJsonPath = path.resolve( |
| 53 | __dirname, |
| 54 | '../../client/i18n/locales/english/intro.json' |
| 55 | ); |
| 56 | const newIntro = await parseIntroJson(introJsonPath); |
| 57 | newIntro[superBlock].blocks[block] = { |
| 58 | title, |
| 59 | intro: ['', ''] |
| 60 | }; |
| 61 | void withTrace( |
| 62 | fs.writeFile, |
| 63 | introJsonPath, |
| 64 | await format(JSON.stringify(newIntro), { parser: 'json' }) |
| 65 | ); |
| 66 | } |
| 67 | |
| 68 | async function createMetaJson( |
| 69 | block: string, |
no test coverage detected