This commit is contained in:
TheArcaneBrony
2022-08-24 03:02:05 +02:00
committed by Rory&
parent 5a6763b8f5
commit 3a0f98ceb9
2 changed files with 16 additions and 14 deletions
+8 -8
View File
@@ -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"));
});
+8 -6
View File
@@ -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}`);