Add npm project configuration (package.json, tsconfig.json, tsup, vitest) matching the taskgraph_ts conventions. All source imports changed from .ts to .js extensions for Node16 module resolution. Tests migrated from Deno.test to vitest. Fixed strict type errors (noUncheckedIndexedAccess). Preserved deno.json with sloppy-imports for dual Deno/Node compatibility. Subpath exports: schema, h, reactive, context, events, pointer, host, transform, jsx-runtime — plus barrel export at root. Build: ESM + CJS dual output via tsup. 22 tests passing.
21 lines
594 B
TypeScript
21 lines
594 B
TypeScript
import { defineConfig } from 'tsup';
|
|
|
|
export default defineConfig({
|
|
entry: {
|
|
mod: 'src/mod.ts',
|
|
'core/schema': 'src/core/schema.ts',
|
|
'core/h': 'src/core/h.ts',
|
|
'core/reactive': 'src/core/reactive.ts',
|
|
'core/context': 'src/core/context.ts',
|
|
'core/events': 'src/core/events.ts',
|
|
'core/pointer': 'src/core/pointer.ts',
|
|
'core/jsx-runtime': 'src/core/jsx-runtime.ts',
|
|
'host/config': 'src/host/config.ts',
|
|
'transform/registry': 'src/transform/registry.ts',
|
|
},
|
|
format: ['esm', 'cjs'],
|
|
dts: true,
|
|
sourcemap: true,
|
|
clean: true,
|
|
target: 'es2022',
|
|
}); |