cryptgeon/packages/cli/build.js

16 lines
363 B
JavaScript
Raw Normal View History

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