ShiboSoftwareDev/f1c100s-linux-gameboy

Restores PCB assembly metadata by assigning part numbers, managing 3D CAD models and orientations, removing test-point bodies, and validating top-side SMT solder-paste features.

Version
1.0.8
License
unset
Stars
0

scripts/use-prebuilt-dist.mjs

import { execFileSync } from "node:child_process"
import { existsSync } from "node:fs"
import { rm } from "node:fs/promises"
import { dirname } from "node:path"
import { fileURLToPath } from "node:url"

const archivePath = fileURLToPath(new URL("../website-dist.tar.gz", import.meta.url))
const distPath = fileURLToPath(new URL("../dist", import.meta.url))
const projectPath = dirname(distPath)

if (!existsSync(archivePath)) {
  throw new Error("website-dist.tar.gz is missing")
}

await rm(distPath, { recursive: true, force: true })
execFileSync("tar", ["-xzf", archivePath, "-C", projectPath], {
  stdio: "inherit",
})

console.log("Restored the verified website build to dist/")