18 lines
491 B
JavaScript
18 lines
491 B
JavaScript
import { compilePack } from '@foundryvtt/foundryvtt-cli';
|
|
import { promises as fs } from 'fs';
|
|
|
|
const MODULE_ID = process.cwd();
|
|
const yaml = true;
|
|
const log = true;
|
|
const folders = true;
|
|
|
|
const packs = await fs.readdir('./src/packs/_source');
|
|
for (const pack of packs) {
|
|
if (pack === '.gitattributes') continue;
|
|
console.log('Packing ' + pack);
|
|
await compilePack(
|
|
`${MODULE_ID}/src/packs/${pack}`,
|
|
`${MODULE_ID}/dist/packs/${pack}`,
|
|
{ yaml, log, recursive: folders }
|
|
);
|
|
} |