Use /dist as base for output

This commit is contained in:
Ducko 2021-01-23 10:38:44 +00:00
parent 5bf718d9ef
commit 54fd99c9eb
2 changed files with 6 additions and 2 deletions

2
.gitignore vendored
View File

@ -2,4 +2,4 @@ node_modules
.cache
clones
modules
dist

View File

@ -10,7 +10,10 @@ import { fileURLToPath } from 'url';
const __dirname = dirname(fileURLToPath(import.meta.url));
const clonesDir = `${__dirname.replace('/src', '')}/clones`;
const modulesDir = `${__dirname.replace('/src', '')}/modules`;
const distDir = `${__dirname.replace('/src', '')}/dist`;
const modulesDir = `${distDir}/modules`;
const resetDir = (dir) => {
rmSync(dir, { recursive: true, force: true });
@ -18,6 +21,7 @@ const resetDir = (dir) => {
};
resetDir(clonesDir);
resetDir(distDir);
resetDir(modulesDir);
import { exec } from 'child_process';