diff --git a/build.mjs b/build.mjs index 6f835e9..ccb53e8 100644 --- a/build.mjs +++ b/build.mjs @@ -79,7 +79,12 @@ async function buildPlugin(plugin) { return await rollup(options).then(async (bundle) => { await bundle.write(options.output); await bundle.close(); - + + const toHash = readFileSync(outPath); + manifest.hash = createHash("sha256").update(toHash).digest("hex"); + manifest.main = "index.js"; + writeFileSync(`./dist/${plugin}/manifest.json`, JSON.stringify(manifest)); + console.log(`${plugin}: ` + "\x1b[32m" + "Build succeed!" + "\x1b[0m"); }); }