From: Arik Sosman Date: Wed, 12 Jan 2022 20:30:37 +0000 (-0800) Subject: Include type declaration files and remove typically unnecessary dependencies. X-Git-Tag: v0.0.105.0~6^2 X-Git-Url: http://git.bitcoin.ninja/index.cgi?p=ldk-java;a=commitdiff_plain;h=a68d0f6a3fdb227df1406ec5af0dae11d9ad3286 Include type declaration files and remove typically unnecessary dependencies. Update files to include *.mjs files and remove npmignore. Update .gitignore Update .npmignore Update .gitignore Make publication generate node-compatible modules. --- diff --git a/ts/.gitignore b/ts/.gitignore new file mode 100644 index 00000000..ccf24f9f --- /dev/null +++ b/ts/.gitignore @@ -0,0 +1,2 @@ +*.mjs +*.mjs.map diff --git a/ts/package.json b/ts/package.json index eda6aec0..c0d6959f 100644 --- a/ts/package.json +++ b/ts/package.json @@ -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 index 00000000..619c96d2 --- /dev/null +++ b/ts/test/.gitignore @@ -0,0 +1,2 @@ +!browser.mjs +!node.mjs diff --git a/ts/tsconfig.json b/ts/tsconfig.json index 4728be18..250c28f7 100644 --- a/ts/tsconfig.json +++ b/ts/tsconfig.json @@ -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,