INNER CODE UNIT · TypeScript

cleanGeneratedImages

PaulWoitaschek/Voice · artwork/src/render/render.ts:118

function cleanGeneratedImages(locale: string): void {
  const dir = imagesDir(locale)
  if (!existsSync(dir)) return

  for (const file of GENERATED_IMAGE_FILES) {
    rmSync(join(dir, file), { force: true })
  }
  for (const screenshotDir of GENERATED_SCREENSHOT_DIRS) {
    rmSync(join(dir, screenshotDir), { recursive: true, force: true })
  }
}

async function main() {
  const locales = listLocales()
  if (locales.length === 0) {
    console.error('No locales with marketing.yml found.')
    process.exit(1)
  }

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…