Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/improsocial/impro
An extensible Bluesky client for web impro.social
Something went wrong. Try again.
JavaScript
12345678910111213141516171819202122import * as esbuild from "esbuild";import crypto from "node:crypto";
// SDK is built here so we can pass its hashed filename to the HTMLexport default async function () { const built = await esbuild.build({ entryPoints: ["impro-plugin/main.js"], bundle: true, format: "iife", globalName: "ImproPlugin", write: false, }); const code = built.outputFiles[0].text; const hash = crypto .createHash("sha256") .update(code) .digest("hex") .slice(0, 10);
return { code, fileName: `pluginSdk.${hash}.js` };}