Improve build scripts, strip more fs-extras

This commit is contained in:
The Arcane Brony
2021-12-21 21:49:58 +01:00
parent 02235067f9
commit a12c372f04
3 changed files with 9 additions and 6 deletions
+2 -2
View File
@@ -1,6 +1,6 @@
const dotenv = require("dotenv");
const path = require("path");
const fse = require("fs-extra");
const fs = require("fs");
dotenv.config();
// TODO: write unittest to check if FileStorage.ts is working
@@ -21,7 +21,7 @@ if (process.env.STORAGE_PROVIDER === "file") {
} else {
process.env.STORAGE_LOCATION = path.join(__dirname, "..", "files", "/");
}
fse.ensureDirSync(process.env.STORAGE_LOCATION);
if(!fs.existsSync(process.env.STORAGE_LOCATION)) fs.mkdirSync(process.env.STORAGE_LOCATION, {recursive:true});
}
const { CDNServer } = require("../dist/Server");
const { Config } = require("@fosscord/util");