Skip to content

Commit 1ac8cd1

Browse files
authored
Merge pull request #78 from arik-so/typescript_fixes
Make npm publication generate node-compatible modules.
2 parents 64bcaa6 + a68d0f6 commit 1ac8cd1

File tree

4 files changed

+19
-7
lines changed

4 files changed

+19
-7
lines changed

ts/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*.mjs
2+
*.mjs.map

ts/package.json

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,24 @@
22
"name": "lightningdevkit",
33
"version": "0.0.104.0alpha0",
44
"description": "Lightning Development Kit",
5-
"main": "index.mts",
5+
"main": "index.mjs",
6+
"type": "module",
67
"directories": {
78
"test": "test"
89
},
910
"files": [
10-
"structs/*.mts",
11-
"enums/*.mts",
12-
"bindings.mts",
11+
"structs/*.mjs",
12+
"structs/*.d.mts",
13+
"enums/*.mjs",
14+
"enums/*.d.mts",
15+
"bindings.mjs",
16+
"bindings.d.mts",
1317
"liblightningjs.wasm",
1418
"tsconfig.json",
1519
"README.md",
16-
"test/tests.mts",
17-
"test/node.mjs"
20+
"test/node.mjs",
21+
"test/tests.mjs",
22+
"test/tests.d.mts"
1823
],
1924
"repository": {
2025
"type": "git",

ts/test/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
!browser.mjs
2+
!node.mjs

ts/tsconfig.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,11 @@
22
"compilerOptions": {
33
"target": "es2021",
44
"module": "es2020",
5+
"sourceMap": true,
6+
"esModuleInterop": false,
7+
"allowSyntheticDefaultImports": true,
58
"forceConsistentCasingInFileNames": true,
6-
9+
"declaration": true,
710
"strict": true,
811
"noImplicitAny": true,
912
"strictNullChecks": false,

0 commit comments

Comments
 (0)