Skip to content

Commit

Permalink
chore(tabby-threads): add iife dist for create thread from iframe (#3574
Browse files Browse the repository at this point in the history
)

* chore(tabby-threads): add iife dist for createThreadFromIframe.

* chore: update pnpm-lock.yaml.
  • Loading branch information
icycodes authored Dec 17, 2024
1 parent 78e9866 commit a2b91f2
Show file tree
Hide file tree
Showing 4 changed files with 91 additions and 85 deletions.
1 change: 1 addition & 0 deletions clients/tabby-threads/exports/create-thread-from-iframe.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { createThreadFromIframe } from "../source";
5 changes: 3 additions & 2 deletions clients/tabby-threads/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@
"build": "tsc --emitDeclarationOnly && rollup -c rollup.config.js"
},
"dependencies": {
"@quilted/signals": "0.2.1",
"@quilted/events": "2.0.0"
"@quilted/events": "2.0.0",
"@quilted/signals": "0.2.1"
},
"devDependencies": {
"@rollup/plugin-node-resolve": "^16.0.0",
"@rollup/plugin-typescript": "^12.1.1",
"rollup": "^4.27.3",
"typescript": "^5.3.3"
Expand Down
23 changes: 21 additions & 2 deletions clients/tabby-threads/rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import typescript from "@rollup/plugin-typescript";
import resolve from "@rollup/plugin-node-resolve";
import { defineConfig } from "rollup";

export default defineConfig({
export default defineConfig([{
input: "source/index.ts",
output: [
{
Expand All @@ -26,4 +27,22 @@ export default defineConfig({
}),
],
external: ["@quilted/events", "@preact/signals"],
});
}, {
input: "exports/create-thread-from-iframe.ts",
output: {
dir: "dist",
format: "iife",
entryFileNames: "iife/[name].js",
name: "TabbyThreads",
},
treeshake: true,
plugins: [
resolve({
browser: true,
}),
typescript({
tsconfig: "./tsconfig.json",
noEmitOnError: true,
}),
],
}]);
Loading

0 comments on commit a2b91f2

Please sign in to comment.