From a68d0f6a3fdb227df1406ec5af0dae11d9ad3286 Mon Sep 17 00:00:00 2001 From: Arik Sosman Date: Wed, 12 Jan 2022 12:30:37 -0800 Subject: [PATCH] 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. --- ts/.gitignore | 2 ++ ts/package.json | 17 +++++++++++------ ts/test/.gitignore | 2 ++ ts/tsconfig.json | 5 ++++- 4 files changed, 19 insertions(+), 7 deletions(-) create mode 100644 ts/.gitignore create mode 100644 ts/test/.gitignore 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, -- 2.39.5