[PCPlugin] Rewrite original JS code and use relative path

This commit is contained in:
Ducko 2021-04-05 11:16:57 +01:00 committed by Keanu
parent d075c67250
commit db3fda3dd6
Signed by: keanucode
GPG Key ID: A7431C0D513CA93B
1 changed files with 2 additions and 2 deletions

View File

@ -4,7 +4,7 @@ export default (manifestPath, repo) => {
const pcManifest = JSON.parse(readFileSync(manifestPath, 'utf8'));
let manifest = {
main: 'index.js',
main: '../index.js',
tags: ['port'],
name: pcManifest.name,
@ -22,5 +22,5 @@ export default (manifestPath, repo) => {
const jsCode = content.replace(`module.exports = class`, `export default new class`).replace(/{ *Plugin *}/, `{ Plugin, powercord }`);
writeFileSync(`${manifestPath}/goosemodModule.json`, JSON.stringify(manifest));
writeFileSync(`${manifestPath}/index.js`, jsCode);
writeFileSync(`${manifestPath}/../index.js`, jsCode);
};