mirror of
https://github.com/jwetzell/acn-js.git
synced 2026-07-26 10:28:41 +00:00
switch to tsdown
This commit is contained in:
Generated
+867
File diff suppressed because it is too large
Load Diff
@@ -2,19 +2,19 @@
|
||||
"name": "@jwetzell/acn",
|
||||
"version": "0.1.0",
|
||||
"description": "",
|
||||
"main": "./dist/cjs/index.js",
|
||||
"module": "./dist/esm/index.js",
|
||||
"types": "./dist/types/index.d.ts",
|
||||
"main": "./dist/index.cjs",
|
||||
"module": "./dist/index.mjs",
|
||||
"types": "./dist/index.d.cts",
|
||||
"exports": {
|
||||
".": {
|
||||
"import": "./dist/esm/index.js",
|
||||
"require": "./dist/cjs/index.js",
|
||||
"types": "./dist/types/index.d.ts"
|
||||
}
|
||||
"import": "./dist/index.mjs",
|
||||
"require": "./dist/index.cjs"
|
||||
},
|
||||
"./package.json": "./package.json"
|
||||
},
|
||||
"scripts": {
|
||||
"prebuild": "rimraf dist",
|
||||
"build": "npm run build:cjs && npm run build:esm && npm run build:types",
|
||||
"build": "tsdown",
|
||||
"build:cjs": "tsc -p tsconfig.cjs.json",
|
||||
"build:esm": "tsc -p tsconfig.esm.json",
|
||||
"build:types": "tsc -p tsconfig.types.json",
|
||||
@@ -38,6 +38,7 @@
|
||||
"devDependencies": {
|
||||
"@types/node": "25.9.1",
|
||||
"rimraf": "6.1.3",
|
||||
"tsdown": "0.22.1",
|
||||
"typescript": "5.9.3"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import pdu from '.';
|
||||
import { Protocol } from '../enums';
|
||||
import { RootLayerPDU, SessionDataTransportPDU } from '../types';
|
||||
import type { RootLayerPDU, SessionDataTransportPDU } from '../types';
|
||||
import { toHex } from '../utils';
|
||||
|
||||
function decode(bytes: Uint8Array): RootLayerPDU {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Protocol, SDTVector } from '../enums';
|
||||
import {
|
||||
import type {
|
||||
SDTAckData,
|
||||
SDTConnectAcceptData,
|
||||
SDTConnectData,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { ACNPacket, RootLayerPDU, UDPPreamble } from './types';
|
||||
import pdu from './pdu';
|
||||
import type { ACNPacket, RootLayerPDU, UDPPreamble } from './types';
|
||||
|
||||
// ANSI E1.17 - 2015 (R2020) EPI 17
|
||||
export function decode(bytes: Uint8Array): ACNPacket<UDPPreamble, RootLayerPDU, undefined> {
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
{
|
||||
"extends": "./tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"module": "CommonJS",
|
||||
"declaration": false,
|
||||
"outDir": "./dist/cjs"
|
||||
}
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
{
|
||||
"extends": "./tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"module": "ESNext",
|
||||
"declaration": false,
|
||||
"outDir": "./dist/esm"
|
||||
}
|
||||
}
|
||||
@@ -1,12 +1,20 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"moduleResolution": "Node",
|
||||
"lib": ["ESNext"],
|
||||
"target": "ESNext",
|
||||
"target": "esnext",
|
||||
"lib": ["es2023"],
|
||||
"moduleDetection": "force",
|
||||
"module": "preserve",
|
||||
"moduleResolution": "bundler",
|
||||
"resolveJsonModule": true,
|
||||
"types": ["node"],
|
||||
"strict": true,
|
||||
"noUnusedLocals": true,
|
||||
"declaration": true,
|
||||
"emitDeclarationOnly": true,
|
||||
"esModuleInterop": true,
|
||||
"isolatedModules": true,
|
||||
"rootDir": "src/",
|
||||
"strict": true
|
||||
"verbatimModuleSyntax": true,
|
||||
"skipLibCheck": true
|
||||
},
|
||||
"include": ["src/"]
|
||||
"include": ["src"]
|
||||
}
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
{
|
||||
"extends": "./tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"emitDeclarationOnly": true,
|
||||
"declaration": true,
|
||||
"outDir": "./dist/types"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
import { defineConfig } from 'tsdown'
|
||||
|
||||
export default defineConfig({
|
||||
entry: 'src/index.ts',
|
||||
exports: true,
|
||||
format: {
|
||||
esm: {},
|
||||
cjs: {},
|
||||
},
|
||||
})
|
||||
Reference in New Issue
Block a user