Adding Prettier

* Added prettier with automatic useage on pre-commit to avoid style breakage
* Ran Prettier on the project
This commit is contained in:
WBHarry 2025-05-23 18:57:50 +02:00 committed by GitHub
parent 820c2df1f4
commit b24cdcc9ed
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
136 changed files with 13929 additions and 12206 deletions

View file

@ -1,16 +1,12 @@
import { compilePack } from "@foundryvtt/foundryvtt-cli";
import { promises as fs } from "fs";
import { compilePack } from '@foundryvtt/foundryvtt-cli';
import { promises as fs } from 'fs';
const MODULE_ID = process.cwd();
const yaml = false;
const packs = await fs.readdir("./src/packs");
const packs = await fs.readdir('./src/packs');
for (const pack of packs) {
if (pack === ".gitattributes") continue;
console.log("Packing " + pack);
await compilePack(
`${MODULE_ID}/src/packs/${pack}`,
`${MODULE_ID}/packs/${pack}`,
{ yaml },
);
if (pack === '.gitattributes') continue;
console.log('Packing ' + pack);
await compilePack(`${MODULE_ID}/src/packs/${pack}`, `${MODULE_ID}/packs/${pack}`, { yaml });
}