moon-sighting/tsup.config.ts
Aric Camarata b46ba2a74c Initial release: moon-calc v1.0.0
High-accuracy lunar crescent visibility using JPL DE442S ephemerides.
Implements Yallop q-test and Odeh V-parameter with all five crescent
geometry quantities (ARCL, ARCV, DAZ, W, lag). Full time scale chain
(UTC → TDB), IERS Q·R·W frame transforms, WGS84 observer model,
Bennett refraction, and kernel-free moon phase via Meeus approximation.
2026-02-25 15:45:41 -05:00

36 lines
761 B
TypeScript

import { defineConfig } from 'tsup'
export default defineConfig([
// Library build (CJS + ESM)
{
entry: { index: 'src/index.ts' },
format: ['cjs', 'esm'],
dts: true,
clean: true,
outDir: 'dist',
splitting: false,
sourcemap: true,
target: 'es2020',
platform: 'node',
outExtension({ format }) {
return { js: format === 'cjs' ? '.cjs' : '.mjs' }
},
},
// CLI build (CJS only, with shebang)
{
entry: { 'cli/index': 'src/cli/index.ts' },
format: ['cjs'],
dts: false,
outDir: 'dist',
splitting: false,
sourcemap: false,
target: 'es2020',
platform: 'node',
banner: {
js: '#!/usr/bin/env node',
},
outExtension() {
return { js: '.cjs' }
},
},
])