2024-04-11 01:24:42 -04:00

26 lines
645 B
TypeScript
Executable File

#!/usr/bin/env bun
import { promises as fs } from "node:fs";
import { type Options, build } from "tsup";
import { pick } from "lodash";
import tsupConfig from "../tsup.config";
import pkg from "../package.json" with { type: "json" };
await build(tsupConfig as Options);
await Bun.write(
"dist/package.json",
JSON.stringify(
pick(pkg, ["name", "version", "license", "dependencies", "author"]),
null,
2
)
);
await Bun.write(
`dist/base.d.ts`,
`/**\n * \`@tailwind base\` component.\n */\nexport {};`
);
await fs.copyFile("README.md", "dist/README.md");
await fs.copyFile("LICENSE.md", "dist/LICENSE.md");
process.exit(0);