mirror of
https://github.com/smartfrigde/armcord.git
synced 2026-06-23 05:25:43 +00:00
* wip: local shelter plugins * serve plugins over armcord protocol * remove useless comments * remove use strict from bundles before sending them * update lockfile * lint * check for path escape * add fix bundle script * format script * remove unused imports
9 lines
388 B
JavaScript
9 lines
388 B
JavaScript
import fs from "fs";
|
|
import path from "path";
|
|
|
|
const pathToPlugins = path.join(import.meta.dirname, "..", "ts-out", "plugins");
|
|
console.log(pathToPlugins);
|
|
fs.readdirSync(pathToPlugins).forEach((file) => {
|
|
const bundle = fs.readFileSync(`${pathToPlugins}/${file}/plugin.js`, "utf8");
|
|
fs.writeFileSync(`${pathToPlugins}/${file}/plugin.js`, bundle.replace(/.*/, "").substr(1));
|
|
});
|