Fix error on Windows (#9)

This commit is contained in:
PandaDriver 2021-07-01 21:13:52 +02:00 committed by Alyxia Sother
parent 0300abe06e
commit ae21d6d6cc
No known key found for this signature in database
GPG Key ID: 355968D14144B739
1 changed files with 45 additions and 44 deletions

View File

@ -1,10 +1,7 @@
import ModuleRepos from './modules/index.js';
import AutoTag from './autoTag.js';
<<<<<<< HEAD
import WebhookSend from './webhook.js';
=======
import ImageCDN from './imageCdn.js';
>>>>>>> 606a100 ([Feat] Local images building)
import Parcel from 'parcel-bundler';
import axios from 'axios';
@ -13,7 +10,7 @@ import glob from 'glob';
import { rmSync, mkdirSync, readFileSync, writeFileSync, copyFileSync, existsSync, rmdirSync } from 'fs';
import { createHash } from 'crypto';
import { dirname } from 'path';
import { dirname, sep } from 'path';
import { fileURLToPath } from 'url';
let file;
@ -28,9 +25,9 @@ try {
const __dirname = dirname(fileURLToPath(import.meta.url));
const clonesDir = `${__dirname.replace('/src', '')}/clones`;
const clonesDir = `${__dirname.replace(`${sep}src`, '')}/clones`;
const distDir = `${__dirname.replace('/src', '')}/dist`;
const distDir = `${__dirname.replace(`${sep}src`, '')}/dist`;
global.distDir = distDir;
const modulesDir = `${distDir}/module`;
@ -245,6 +242,10 @@ for (const parentRepo of ModuleRepos) {
writeFileSync(`${distDir}/modules.json`, JSON.stringify(oldTotalModulesJson));
<<<<<<< HEAD
copyFileSync(`${__dirname.replace('/src', '')}/_headers`, `${distDir}/_headers`);
WebhookSend();
=======
copyFileSync(`${__dirname.replace(`${sep}src`, '')}/_headers`, `${distDir}/_headers`);
>>>>>>> 66b474c (Fix error on Windows (#9))