foundry-dsa41-game/installToFoundry.mjs

15 lines
431 B
JavaScript

import {cpSync, existsSync} from 'node:fs';
import {join, resolve} 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?`)
}