UNPKG

constatic

Version:

Constatic is a CLI for creating and managing modern TypeScript projects, providing an organized structure and features that streamline development.

15 lines (14 loc) 533 B
// src/actions/bot/add/tsup.ts import merge from "lodash.merge"; import { readPackageJSON } from "pkg-types"; import { copy } from "fs-extra"; import { join } from "node:path"; async function addBotTsupAction(props) { const { pkg, distdir, cli } = props; const tsupPackageJson = await readPackageJSON(join(cli.templates.botPath, "extras/tsup/package.json")); merge(pkg, tsupPackageJson); await copy(join(cli.templates.botPath, "extras/tsup/tsup.config.ts"), join(distdir, "tsup.config.ts")); } export { addBotTsupAction };