add build cli

This commit is contained in:
2024-08-23 09:59:06 +02:00
parent 145f9ef18f
commit 3ea176cc1f
2 changed files with 16 additions and 1 deletions

14
packages/cli/build.js Normal file
View File

@@ -0,0 +1,14 @@
import pkg from './package.json' assert { type: 'json' }
import { build } from 'tsup'
const watch = process.argv.slice(2)[0] === '--watch'
await build({
entry: ['src/index.ts', 'src/cli.ts'],
dts: true,
minify: true,
format: ['esm', 'cjs'],
clean: true,
define: { VERSION: `"${pkg.version}"` },
watch,
})