Include type declaration files and remove typically unnecessary dependencies.
authorArik Sosman <git@arik.io>
Wed, 12 Jan 2022 20:30:37 +0000 (12:30 -0800)
committerArik Sosman <git@arik.io>
Fri, 14 Jan 2022 17:52:08 +0000 (09:52 -0800)
Update files to include *.mjs files and remove npmignore.

Update .gitignore

Update .npmignore

Update .gitignore

Make publication generate node-compatible modules.

ts/.gitignore [new file with mode: 0644]
ts/package.json
ts/test/.gitignore [new file with mode: 0644]
ts/tsconfig.json

diff --git a/ts/.gitignore b/ts/.gitignore
new file mode 100644 (file)
index 0000000..ccf24f9
--- /dev/null
@@ -0,0 +1,2 @@
+*.mjs
+*.mjs.map
index eda6aec0c8ee49e39fe3f7caa8d784f89840a93f..c0d6959f080a4b3368961f7598f4afff65b09419 100644 (file)
@@ -2,19 +2,24 @@
   "name": "lightningdevkit",
   "version": "0.0.104.0alpha0",
   "description": "Lightning Development Kit",
-  "main": "index.mts",
+  "main": "index.mjs",
+  "type": "module",
   "directories": {
     "test": "test"
   },
   "files": [
-    "structs/*.mts",
-    "enums/*.mts",
-    "bindings.mts",
+    "structs/*.mjs",
+    "structs/*.d.mts",
+    "enums/*.mjs",
+    "enums/*.d.mts",
+    "bindings.mjs",
+    "bindings.d.mts",
     "liblightningjs.wasm",
     "tsconfig.json",
     "README.md",
-    "test/tests.mts",
-    "test/node.mjs"
+    "test/node.mjs",
+    "test/tests.mjs",
+    "test/tests.d.mts"
   ],
   "repository": {
     "type": "git",
diff --git a/ts/test/.gitignore b/ts/test/.gitignore
new file mode 100644 (file)
index 0000000..619c96d
--- /dev/null
@@ -0,0 +1,2 @@
+!browser.mjs
+!node.mjs
index 4728be189f9e48c83d93dc17ebc19ab53ba41a49..250c28f764fb7c2711fa8c99260e446723de2f7a 100644 (file)
@@ -2,8 +2,11 @@
   "compilerOptions": {
     "target": "es2021",
     "module": "es2020",
+    "sourceMap": true,
+    "esModuleInterop": false,
+    "allowSyntheticDefaultImports": true,
     "forceConsistentCasingInFileNames": true,
-
+    "declaration": true,
     "strict": true,
     "noImplicitAny": true,
     "strictNullChecks": false,