import { cpSync, existsSync } from 'node:fs'; import { resolve, join } from 'node:path'; const MODULE_ID = process.cwd(); const SRC = join(MODULE_ID, "/dist") const DEST = "/home/macniel/.local/share/FoundryVTT/Data/systems/DSA_4-1" if ( existsSync(SRC)) { cpSync(SRC, resolve(DEST), { recursive: true }) console.log(`copied ${SRC} to ${DEST}`) } else { console.error(`Source ${SRC} does not exists. Forgot to compile?`) }