cryptgeon/packages/cli/build.js

16 lines
363 B
JavaScript
Raw Normal View History

2024-08-23 09:59:06 +02:00
import { build } from 'tsup'
2024-09-02 10:19:35 +02:00
import pkg from './package.json' with { type: 'json' }
2024-08-23 09:59:06 +02:00
const watch = process.argv.slice(2)[0] === '--watch'
await build({
2024-09-02 10:19:35 +02:00
entry: ['src/index.ts', 'src/cli.ts', 'src/shared/shared.ts'],
2024-08-23 09:59:06 +02:00
dts: true,
minify: true,
format: ['esm', 'cjs'],
2024-09-02 10:19:35 +02:00
target: 'es2020',
2024-08-23 09:59:06 +02:00
clean: true,
define: { VERSION: `"${pkg.version}"` },
watch,
})