feat: tfcode

This commit is contained in:
Gab
2026-04-04 17:56:41 +11:00
parent ffc99307a8
commit c5af4f99e1
17 changed files with 643 additions and 10 deletions

View File

@@ -110,6 +110,10 @@ async function createMainPackage() {
await Bun.file(`./dist/tfcode/postinstall.mjs`).write(await Bun.file("./script/postinstall-tfcode.mjs").text())
await Bun.file(`./dist/tfcode/LICENSE`).write(await Bun.file("../../LICENSE").text())
// Copy embedded python module (tf_sync)
await $`cp -r ./python ./dist/tfcode/`
console.log("Copied embedded python/tf_sync module")
// Copy the current platform's binary to the main package
// This makes installation faster (no need to download or copy from optionalDependencies)
const currentPlatform = process.platform === "darwin" ? "darwin" : process.platform === "linux" ? "linux" : "windows"