uikit/scripts/copy-provider-types.mjs
Mohamadzadeh f11313909d
All checks were successful
Build and Deploy Next.js + Nginx Docker Image / build-and-deploy (push) Has been skipped
Build and Deploy Next.js + Nginx Docker Image / deploy (push) Has been skipped
add new BiProvider and v1.1.0
2026-10-25 16:15:10 +03:30

10 lines
594 B
JavaScript

import { mkdir, copyFile, writeFile } from "node:fs/promises";
const names = ["", "keycloak", "permission", "api", "query", "chakra", "next-pages-router", "next-app-router", "vite", "update-checker"];
await mkdir("dist", { recursive: true });
for (const name of names) {
await copyFile(`src/provider/${name || "index"}.d.ts`, `dist/provider${name ? `-${name}` : ""}.d.ts`);
}
// The public declaration is next to dist/core.d.ts, unlike the source module.
await writeFile("dist/provider-legacy.d.ts", 'export { BiProvider } from "./core";\nexport type { BiProviderProps } from "./core";\n');