mirror of
https://github.com/acamarata/moon-sighting.git
synced 2026-06-30 19:04:24 +00:00
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.
36 lines
761 B
TypeScript
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' }
|
|
},
|
|
},
|
|
])
|