1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2025-09-01 10:07:56 +00:00

Switch from path to parentPath

I've been putting this off for a while, as I had issues in the past with
people using old Node versions (e.g. #1806), but it no long works on my
machine, so time to make the switch.

Also do a bit of a package update. Hit a rollup bug while doing this
(https://github.com/rollup/plugins/issues/1877), so holding that update
back for now.
This commit is contained in:
Jonathan Coates
2025-06-17 17:46:10 +01:00
parent 69353a4fcf
commit b35cefc5dd
6 changed files with 370 additions and 333 deletions

View File

@@ -56,7 +56,7 @@ import { type DataExport, WithExport } from "./components/WithExport";
for (const file of await fs.readdir(sourceDir, { withFileTypes: true, recursive: true })) {
if(!file.isFile() || !file.name.endsWith(".html")) continue;
const sourcePath = path.join(file.path, file.name);
const sourcePath = path.join(file.parentPath, file.name);
const contents = await fs.readFile(sourcePath, "utf-8");
const { result } = await processor.process(contents);