feat: add internal skg infinite canvas
This commit is contained in:
17
web/scripts/sync-canvas-dist.mjs
Normal file
17
web/scripts/sync-canvas-dist.mjs
Normal file
@@ -0,0 +1,17 @@
|
||||
import { cp, mkdir, rm } from "node:fs/promises"
|
||||
import { existsSync } from "node:fs"
|
||||
import { dirname, resolve } from "node:path"
|
||||
import { fileURLToPath } from "node:url"
|
||||
|
||||
const here = dirname(fileURLToPath(import.meta.url))
|
||||
const webRoot = resolve(here, "..")
|
||||
const source = resolve(webRoot, "canvas-app", "dist")
|
||||
const target = resolve(webRoot, "public", "canvas")
|
||||
|
||||
if (!existsSync(source)) {
|
||||
throw new Error(`Canvas build output missing: ${source}`)
|
||||
}
|
||||
|
||||
await rm(target, { recursive: true, force: true })
|
||||
await mkdir(target, { recursive: true })
|
||||
await cp(source, target, { recursive: true })
|
||||
Reference in New Issue
Block a user