Skip to content

Commit 2f8431f

Browse files
committed
fix: remove tsup, replace with Vite + dts-bundle-generator
1 parent fb67ae6 commit 2f8431f

31 files changed

+1918
-2495
lines changed

packages/excel-builder-vanilla-types/dist/index.d.cts

Lines changed: 897 additions & 891 deletions
Large diffs are not rendered by default.

packages/excel-builder-vanilla-types/dist/index.d.ts

Lines changed: 897 additions & 891 deletions
Large diffs are not rendered by default.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import { readFileSync, writeFileSync } from 'node:fs';
2+
3+
writeFileSync('dist/index.d.cts', readFileSync('dist/index.d.ts'));

packages/excel-builder-vanilla/package.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
},
3030
"type": "module",
3131
"main": "./dist/index.cjs",
32-
"module": "./dist/index.mjs",
3332
"types": "./dist/index.d.ts",
3433
"exports": {
3534
".": {
@@ -51,11 +50,11 @@
5150
},
5251
"scripts": {
5352
"clean": "rimraf dist ../excel-builder-vanilla-types/dist",
54-
"dev:init": "tsup && pnpm copy:types",
55-
"dev": "tsup --watch --onSuccess \"pnpm build:types:map\"",
56-
"build": "pnpm clean && tsup && pnpm copy:types",
57-
"build:types:map": "tsc --emitDeclarationOnly --incremental --declarationMap --outDir dist",
58-
"build:vite": "pnpm clean && vite build && pnpm copy:types",
53+
"dev:init": "vite build",
54+
"dev": "vite build --watch",
55+
"build": "pnpm clean && vite build && pnpm build:dts && pnpm clone:dts && pnpm copy:types",
56+
"build:dts": "dts-bundle-generator -o dist/index.d.ts src/index.ts",
57+
"clone:dts": "node clone-dts.mjs",
5958
"copy:types": "node copy-types.mjs",
6059
"are-type-wrong": "attw --pack ."
6160
},
@@ -65,7 +64,8 @@
6564
"devDependencies": {
6665
"@arethetypeswrong/cli": "^0.16.4",
6766
"copyfiles": "^2.4.1",
68-
"tsup": "^8.3.0",
69-
"typescript": "^5.6.2"
67+
"dts-bundle-generator": "^9.5.1",
68+
"typescript": "^5.6.2",
69+
"vite": "^5.4.8"
7070
}
7171
}

packages/excel-builder-vanilla/src/Excel/Drawing/AbsoluteAnchor.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { Util } from '../Util';
2-
import type { XMLDOM } from '../XMLDOM';
1+
import { Util } from '../Util.js';
2+
import type { XMLDOM } from '../XMLDOM.js';
33

44
/**
55
*

packages/excel-builder-vanilla/src/Excel/Drawing/Drawing.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import { uniqueId } from '../../utilities/uniqueId';
2-
import { AbsoluteAnchor } from './AbsoluteAnchor';
3-
import { Chart } from './Chart';
4-
import { OneCellAnchor } from './OneCellAnchor';
5-
import { TwoCellAnchor } from './TwoCellAnchor';
6-
// import { Picture } from './Picture';
1+
import { uniqueId } from '../../utilities/uniqueId.js';
2+
import { AbsoluteAnchor } from './AbsoluteAnchor.js';
3+
import { Chart } from './Chart.js';
4+
import { OneCellAnchor } from './OneCellAnchor.js';
5+
import { TwoCellAnchor } from './TwoCellAnchor.js';
6+
// import { Picture } from './Picture.js';
77

88
/**
99
* This is mostly a global spot where all of the relationship managers can get and set

packages/excel-builder-vanilla/src/Excel/Drawing/OneCellAnchor.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { Util } from '../Util';
2-
import type { XMLDOM } from '../XMLDOM';
1+
import { Util } from '../Util.js';
2+
import type { XMLDOM } from '../XMLDOM.js';
33

44
/**
55
*

packages/excel-builder-vanilla/src/Excel/Drawing/Picture.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import { uniqueId } from '../../utilities/uniqueId';
2-
import { Util } from '../Util';
3-
import type { XMLDOM } from '../XMLDOM';
4-
import { Drawing } from './Drawing';
1+
import { uniqueId } from '../../utilities/uniqueId.js';
2+
import { Util } from '../Util.js';
3+
import type { XMLDOM } from '../XMLDOM.js';
4+
import { Drawing } from './Drawing.js';
55

66
export class Picture extends Drawing {
77
media: any = null;

packages/excel-builder-vanilla/src/Excel/Drawing/TwoCellAnchor.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { Util } from '../Util';
2-
import type { XMLDOM } from '../XMLDOM';
1+
import { Util } from '../Util.js';
2+
import type { XMLDOM } from '../XMLDOM.js';
33

44
export class TwoCellAnchor {
55
from: any = { xOff: 0, yOff: 0 };

packages/excel-builder-vanilla/src/Excel/Drawings.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import { uniqueId } from '../utilities/uniqueId';
2-
import type { Drawing } from './Drawing/Drawing';
3-
import type { Picture } from './Drawing/Picture';
4-
import { RelationshipManager } from './RelationshipManager';
5-
import { Util } from './Util';
1+
import { uniqueId } from '../utilities/uniqueId.js';
2+
import type { Drawing } from './Drawing/Drawing.js';
3+
import type { Picture } from './Drawing/Picture.js';
4+
import { RelationshipManager } from './RelationshipManager.js';
5+
import { Util } from './Util.js';
66

77
/**
88
* @module Excel/Drawings

0 commit comments

Comments
 (0)