mirror of
https://github.com/spacebarchat/server.git
synced 2026-05-23 19:05:22 +00:00
prettier
This commit is contained in:
+8
-8
@@ -30,10 +30,10 @@ if (silent) console.error = console.log = function () {};
|
||||
if (argv.includes("clean")) {
|
||||
console.log(`[${++i}/${steps}] Cleaning...`);
|
||||
let d = "../" + "/dist";
|
||||
if (fs.existsSync(d)) {
|
||||
fs.rmSync(d, { recursive: true });
|
||||
if (verbose) console.log(`Deleted ${d}!`);
|
||||
}
|
||||
if (fs.existsSync(d)) {
|
||||
fs.rmSync(d, { recursive: true });
|
||||
if (verbose) console.log(`Deleted ${d}!`);
|
||||
}
|
||||
}
|
||||
|
||||
console.log(`[${++i}/${steps}] Compiling src files ...`);
|
||||
@@ -110,7 +110,7 @@ if (!argv.includes("copyonly")) {
|
||||
}
|
||||
|
||||
console.log(`[${++i}/${steps}] Copying plugin data...`);
|
||||
let pluginFiles = walk(pluginDir).filter(x=>!x.endsWith('.ts'));
|
||||
pluginFiles.forEach(x=>{
|
||||
fs.copyFileSync(x, x.replace('src','dist'))
|
||||
})
|
||||
let pluginFiles = walk(pluginDir).filter((x) => !x.endsWith(".ts"));
|
||||
pluginFiles.forEach((x) => {
|
||||
fs.copyFileSync(x, x.replace("src", "dist"));
|
||||
});
|
||||
|
||||
@@ -57,12 +57,14 @@ function applyConfig(val: any) {
|
||||
if (!pair) pair = new PluginConfigEntity();
|
||||
|
||||
pair.key = key;
|
||||
pair.value = obj;
|
||||
if (!pair.key || pair.key == null) {
|
||||
console.log(`[PluginConfig] WARN: Empty key`);
|
||||
console.log(pair);
|
||||
if (Environment.isDebug) debugger;
|
||||
} else return pair.save();
|
||||
if (pair.value != obj) {
|
||||
pair.value = obj;
|
||||
if (!pair.key || pair.key == null) {
|
||||
console.log(`[PluginConfig] WARN: Empty key`);
|
||||
console.log(pair);
|
||||
if (Environment.isDebug) debugger;
|
||||
} else return pair.save();
|
||||
}
|
||||
}
|
||||
if (process.env.PLUGIN_CONFIG_PATH) {
|
||||
if (Environment.isDebug) console.log(`Writing config: ${process.env.PLUGIN_CONFIG_PATH}`);
|
||||
|
||||
Reference in New Issue
Block a user