summary refs log tree commit diff
path: root/scripts/build/plugin_resources.js
diff options
context:
space:
mode:
authorTheArcaneBrony <myrainbowdash949@gmail.com>2022-08-19 18:53:25 +0200
committerTheArcaneBrony <myrainbowdash949@gmail.com>2022-08-19 19:07:10 +0200
commit9071cbdc25e97153086ac48bd389b04c43e56458 (patch)
tree8b6685ad362f9906fbc7fafcea5d2157c4d8d998 /scripts/build/plugin_resources.js
parentMerge remote-tracking branch 'Puyodead1/patch/prettier-config' into staging (diff)
downloadserver-9071cbdc25e97153086ac48bd389b04c43e56458.tar.xz
Updates scripts and tests from dev/plugins
Diffstat (limited to 'scripts/build/plugin_resources.js')
-rw-r--r--scripts/build/plugin_resources.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/scripts/build/plugin_resources.js b/scripts/build/plugin_resources.js
new file mode 100644
index 00000000..5b4b97f2
--- /dev/null
+++ b/scripts/build/plugin_resources.js
@@ -0,0 +1,13 @@
+const { execSync } = require("child_process");
+const path = require("path");
+const fs = require("fs");
+const { argv, stdout, exit } = require("process");
+const { execIn, parts, getDirs, walk, sanitizeVarName } = require("../utils");
+
+module.exports = function (config) {
+	console.log(`==> Copying all plugin resources...`);
+	let pluginFiles = walk(config.pluginDir).filter((x) => !x.endsWith(".ts"));
+	pluginFiles.forEach((x) => {
+		fs.copyFileSync(x, x.replace("src", "dist"));
+	});
+};