feat: rewrite skill creator skill in ts and bundle (#333)
Co-authored-by: Letta <noreply@letta.com>
This commit is contained in:
15
build.js
15
build.js
@@ -5,7 +5,7 @@
|
||||
* Bundles TypeScript source into a single JavaScript file
|
||||
*/
|
||||
|
||||
import { readFileSync } from "node:fs";
|
||||
import { cpSync, existsSync, readFileSync, rmSync } from "node:fs";
|
||||
import { dirname, join } from "node:path";
|
||||
import { fileURLToPath } from "node:url";
|
||||
|
||||
@@ -54,6 +54,19 @@ await Bun.write(outputPath, withShebang);
|
||||
// Make executable
|
||||
await Bun.$`chmod +x letta.js`;
|
||||
|
||||
// Copy bundled skills to skills/ directory for shipping
|
||||
const bundledSkillsSrc = join(__dirname, "src/skills/builtin");
|
||||
const bundledSkillsDst = join(__dirname, "skills");
|
||||
|
||||
if (existsSync(bundledSkillsSrc)) {
|
||||
// Clean and copy
|
||||
if (existsSync(bundledSkillsDst)) {
|
||||
rmSync(bundledSkillsDst, { recursive: true });
|
||||
}
|
||||
cpSync(bundledSkillsSrc, bundledSkillsDst, { recursive: true });
|
||||
console.log("📂 Copied bundled skills to skills/");
|
||||
}
|
||||
|
||||
console.log("✅ Build complete!");
|
||||
console.log(` Output: letta.js`);
|
||||
console.log(
|
||||
|
||||
Reference in New Issue
Block a user