diff options
author | Catalan Lover <48515417+FSG-Cat@users.noreply.github.com> | 2022-08-23 23:50:01 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-23 23:50:01 +0200 |
commit | d63451b3fe6c0c6ab175adec82361834bb3633f5 (patch) | |
tree | b738ee25bf9819300e1802ba9a8e2813e9dc2588 /scripts/build/plugin_resources.js | |
parent | Merge pull request #1 from FSG-Cat/FSG-Cat-patch-1 (diff) | |
parent | Check Captcha (diff) | |
download | server-d63451b3fe6c0c6ab175adec82361834bb3633f5.tar.xz |
Merge branch 'fosscord:staging' into Bug-Report-Template
Diffstat (limited to 'scripts/build/plugin_resources.js')
-rw-r--r-- | scripts/build/plugin_resources.js | 13 |
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")); + }); +}; |