Main: Update build.mjs
This commit is contained in:
parent
d485611692
commit
489f7bf284
1 changed files with 6 additions and 1 deletions
|
|
@ -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");
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue