File tree Expand file tree Collapse file tree 4 files changed +31
-26
lines changed
Expand file tree Collapse file tree 4 files changed +31
-26
lines changed Original file line number Diff line number Diff line change 1616 "url" : " git+https://github.com/neaps/tide-database.git"
1717 },
1818 "license" : " MIT" ,
19- "author" : " " ,
19+ "author" : " Brandon Keepers <brandon@openwaters.io> " ,
2020 "type" : " module" ,
21- "main" : " dist/index.js" ,
21+ "main" : " dist/index.cjs" ,
22+ "exports" : {
23+ "." : {
24+ "types" : " ./dist/index.d.ts" ,
25+ "import" : " ./dist/index.js"
26+ }
27+ },
2228 "directories" : {
2329 "doc" : " docs"
2430 },
2531 "scripts" : {
26- "build" : " tsc -b && tsc -p tsconfig.node.json && vite build " ,
32+ "build" : " tsc -b && tsc -p tsconfig.node.json && tsdown " ,
2733 "prepare" : " npm run build" ,
2834 "test" : " vitest"
2935 },
3844 "make-fetch-happen" : " ^15.0.3" ,
3945 "moment" : " ^2.30.1" ,
4046 "sort-object-keys" : " ^2.0.1" ,
41- "vite " : " ^7.2.6 " ,
42- "vite-plugin-dts " : " ^4.5.4 " ,
47+ "tsdown " : " ^0.19.0-beta.3 " ,
48+ "typescript " : " ^5.9.3 " ,
4349 "vitest" : " ^4.0.15"
4450 },
4551 "files" : [
Original file line number Diff line number Diff line change 1+ import _constituents from './constituents.json' with { type : 'json' }
2+
13export interface HarmonicConstituent {
24 name : string
35 description ?: string
@@ -7,6 +9,12 @@ export interface HarmonicConstituent {
79 speed ?: number
810}
911
12+ export interface Constituent {
13+ name : string
14+ description : string | null
15+ speed : number
16+ }
17+
1018export interface Station {
1119 // Basic station information
1220 id : string
@@ -49,7 +57,7 @@ export interface Station {
4957 datums : Record < string , number >
5058}
5159
52- export { default as constituents } from './constituents.json' with { type : 'json' }
60+ export const constituents : Constituent [ ] = _constituents
5361
5462export const stations : Station [ ] = Object . values (
5563 import . meta. glob ( '../data/**/*.json' , { eager : true , import : 'default' } )
Original file line number Diff line number Diff line change 1+ import { defineConfig } from 'tsdown'
2+
3+ export default defineConfig ( {
4+ entry : [ './src/index.ts' ] ,
5+ dts : true ,
6+ format : [ 'cjs' , 'esm' ] ,
7+ sourcemap : true ,
8+ declarationMap : true ,
9+ target : 'es2020' ,
10+ platform : 'neutral'
11+ } )
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments