feat(release): add plugin packaging script and release notes
This commit is contained in:
15
scripts/package-plugin.mjs
Normal file
15
scripts/package-plugin.mjs
Normal file
@@ -0,0 +1,15 @@
|
||||
import fs from "node:fs";
|
||||
import path from "node:path";
|
||||
|
||||
const root = process.cwd();
|
||||
const pluginDir = path.join(root, "plugin");
|
||||
const outDir = path.join(root, "dist", "plugin");
|
||||
|
||||
fs.rmSync(outDir, { recursive: true, force: true });
|
||||
fs.mkdirSync(outDir, { recursive: true });
|
||||
|
||||
for (const f of ["index.ts", "rules.ts", "openclaw.plugin.json", "README.md", "package.json"]) {
|
||||
fs.copyFileSync(path.join(pluginDir, f), path.join(outDir, f));
|
||||
}
|
||||
|
||||
console.log(`packaged plugin to ${outDir}`);
|
||||
Reference in New Issue
Block a user